Skip to content

Commit

Permalink
Allow access to adapter (#634)
Browse files Browse the repository at this point in the history
Currently there is no way to access the adapter outside of Vello, which
prevents users of Vello from doing things like checking surface
capabilities. This pull request exposes the adapter.
  • Loading branch information
cfagot authored Jul 17, 2024
1 parent d67fa46 commit a59cc8b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vello/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ impl RenderContext {
}
}

impl DeviceHandle {
/// Returns the adapter associated with the device.
pub fn adapter(&self) -> &Adapter {
&self.adapter
}
}

/// Combination of surface and its configuration.
#[derive(Debug)]
pub struct RenderSurface<'s> {
Expand Down

0 comments on commit a59cc8b

Please sign in to comment.