diff options
author | 2023-07-12 19:21:05 -0700 | |
---|---|---|
committer | 2023-07-21 13:53:38 -0700 | |
commit | d53ccc857da4d4cda769904342aeb5a82a64f146 (patch) | |
tree | 7de16b72e0e054d10380586ba5b79a7181478aa7 /renderer/src | |
parent | 633f405f3f78bc7f82d2b2061491b0e011137451 (diff) | |
download | iced-d53ccc857da4d4cda769904342aeb5a82a64f146.tar.gz iced-d53ccc857da4d4cda769904342aeb5a82a64f146.tar.bz2 iced-d53ccc857da4d4cda769904342aeb5a82a64f146.zip |
refactored window storage;
new helper window events (Destroyed, Created);
clippy + fmt;
Diffstat (limited to 'renderer/src')
-rw-r--r-- | renderer/src/compositor.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/renderer/src/compositor.rs b/renderer/src/compositor.rs index 8b17a4b0..b5da31bf 100644 --- a/renderer/src/compositor.rs +++ b/renderer/src/compositor.rs @@ -46,6 +46,22 @@ impl<Theme> crate::graphics::Compositor for Compositor<Theme> { Err(error) } + fn renderer(&self) -> Self::Renderer { + match self { + Compositor::TinySkia(compositor) => { + Renderer::TinySkia(compositor.renderer()) + } + #[cfg(feature = "wgpu")] + Compositor::Wgpu(compositor) => { + Renderer::Wgpu(compositor.renderer()) + } + #[cfg(not(feature = "wgpu"))] + Self::Wgpu => { + panic!("`wgpu` feature was not enabled in `iced_renderer`") + } + } + } + fn create_surface<W: HasRawWindowHandle + HasRawDisplayHandle>( &mut self, window: &W, |