diff options
author | 2024-01-18 10:56:02 +0100 | |
---|---|---|
committer | 2024-01-18 10:56:02 +0100 | |
commit | c929e6f5dd30044df4e7400ab633eaf0a53ce3dd (patch) | |
tree | 021b60ed5f0eeee8e554291189e82da6adecc6e3 | |
parent | 3cf8f77d6537f9d864f4a554b2fff46676a761f6 (diff) | |
download | iced-c929e6f5dd30044df4e7400ab633eaf0a53ce3dd.tar.gz iced-c929e6f5dd30044df4e7400ab633eaf0a53ce3dd.tar.bz2 iced-c929e6f5dd30044df4e7400ab633eaf0a53ce3dd.zip |
Use `Self::Surface` in `Compositor` implementors
-rw-r--r-- | tiny_skia/src/window/compositor.rs | 6 | ||||
-rw-r--r-- | wgpu/src/window/compositor.rs | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tiny_skia/src/window/compositor.rs b/tiny_skia/src/window/compositor.rs index 17d21100..781ed8a5 100644 --- a/tiny_skia/src/window/compositor.rs +++ b/tiny_skia/src/window/compositor.rs @@ -50,7 +50,7 @@ impl<Theme> crate::graphics::Compositor for Compositor<Theme> { window: W, width: u32, height: u32, - ) -> Surface { + ) -> Self::Surface { let window = softbuffer::Surface::new( &self.context, Box::new(window.clone()) as _, @@ -73,7 +73,7 @@ impl<Theme> crate::graphics::Compositor for Compositor<Theme> { fn configure_surface( &mut self, - surface: &mut Surface, + surface: &mut Self::Surface, width: u32, height: u32, ) { @@ -100,7 +100,7 @@ impl<Theme> crate::graphics::Compositor for Compositor<Theme> { fn present<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, - surface: &mut Surface, + surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, overlay: &[T], diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index 105d83a8..31cf3819 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -228,7 +228,7 @@ impl<Theme> graphics::Compositor for Compositor<Theme> { window: W, width: u32, height: u32, - ) -> wgpu::Surface<'static> { + ) -> Self::Surface { let mut surface = self .instance .create_surface(window) @@ -241,7 +241,7 @@ impl<Theme> graphics::Compositor for Compositor<Theme> { fn configure_surface( &mut self, - surface: &mut wgpu::Surface<'static>, + surface: &mut Self::Surface, width: u32, height: u32, ) { @@ -272,7 +272,7 @@ impl<Theme> graphics::Compositor for Compositor<Theme> { fn present<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, - surface: &mut wgpu::Surface<'static>, + surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, overlay: &[T], @@ -293,7 +293,7 @@ impl<Theme> graphics::Compositor for Compositor<Theme> { fn screenshot<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, - _surface: &mut wgpu::Surface<'static>, + _surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, overlay: &[T], |