From 3fc57b7d95f2cd1d8c7bef06547c55195d4e032a Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Thu, 21 Nov 2024 16:26:17 -0800 Subject: Remove `surface` argument of `Compositor::screenshot` This argument was completely ignored by the wgpu renderer, and used only for the `clip_mask` by the `tiny_skia` renderer. I believe creating a new clip mask is correct. This way it's possible to render offscreen without needing a surface. --- graphics/src/compositor.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'graphics/src') diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs index 3026bead..0b862bdb 100644 --- a/graphics/src/compositor.rs +++ b/graphics/src/compositor.rs @@ -90,7 +90,6 @@ pub trait Compositor: Sized { fn screenshot>( &mut self, renderer: &mut Self::Renderer, - surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, overlay: &[T], @@ -201,7 +200,6 @@ impl Compositor for () { fn screenshot>( &mut self, _renderer: &mut Self::Renderer, - _surface: &mut Self::Surface, _viewport: &Viewport, _background_color: Color, _overlay: &[T], -- cgit