refactored window storage;
new helper window events (Destroyed, Created); clippy + fmt;
This commit is contained in:
parent
633f405f3f
commit
d53ccc857d
56 changed files with 1508 additions and 1819 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue