summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-25 16:05:42 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-25 16:05:42 +0100
commit535d7a4d57e131e661587b36e41820dd6ccccc3e (patch)
tree0127873baeff222a32bd840e0735f82249f912d3 /wgpu
parent8c373cd497e370d356b480380482779397bdb510 (diff)
downloadiced-535d7a4d57e131e661587b36e41820dd6ccccc3e.tar.gz
iced-535d7a4d57e131e661587b36e41820dd6ccccc3e.tar.bz2
iced-535d7a4d57e131e661587b36e41820dd6ccccc3e.zip
Implement basic presentation with `softbuffer` for `iced_tiny_skia`
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/src/window/compositor.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs
index 7406bfb8..3a4a7123 100644
--- a/wgpu/src/window/compositor.rs
+++ b/wgpu/src/window/compositor.rs
@@ -201,11 +201,15 @@ impl<Theme> iced_graphics::window::Compositor for Compositor<Theme> {
fn create_surface<W: HasRawWindowHandle + HasRawDisplayHandle>(
&mut self,
window: &W,
+ width: u32,
+ height: u32,
) -> wgpu::Surface {
#[allow(unsafe_code)]
- unsafe {
- self.instance.create_surface(window)
- }
+ let mut surface = unsafe { self.instance.create_surface(window) };
+
+ self.configure_surface(&mut surface, width, height);
+
+ surface
}
fn configure_surface(