mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
make use of Result type in RenderContext
This commit is contained in:
parent
3174e284f2
commit
a4441007c4
|
@ -16,6 +16,8 @@
|
|||
|
||||
//! Simple helpers for managing wgpu state and surfaces.
|
||||
|
||||
use super::Result;
|
||||
|
||||
use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
|
||||
use wgpu::{Device, Instance, Limits, Queue, Surface, SurfaceConfiguration};
|
||||
|
||||
|
@ -27,7 +29,7 @@ pub struct RenderContext {
|
|||
}
|
||||
|
||||
impl RenderContext {
|
||||
pub async fn new() -> Result<Self, Box<dyn std::error::Error>> {
|
||||
pub async fn new() -> Result<Self> {
|
||||
let instance = Instance::new(wgpu::Backends::PRIMARY);
|
||||
let adapter = instance.request_adapter(&Default::default()).await.unwrap();
|
||||
let features = adapter.features();
|
||||
|
|
Loading…
Reference in a new issue