From a59cc8bfdf1fb3895d777fefcd3a0bc2832bcd5d Mon Sep 17 00:00:00 2001 From: cfagot Date: Wed, 17 Jul 2024 00:09:19 -0700 Subject: [PATCH] Allow access to adapter (#634) 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. --- vello/src/util.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vello/src/util.rs b/vello/src/util.rs index 0ae8e2c4f..925f8258c 100644 --- a/vello/src/util.rs +++ b/vello/src/util.rs @@ -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> {