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.
This commit is contained in:
Ian Douglas Scott 2024-11-21 16:26:17 -08:00
parent 2a2e20b0a3
commit 3fc57b7d95
5 changed files with 22 additions and 32 deletions

View file

@ -90,7 +90,6 @@ pub trait Compositor: Sized {
fn screenshot<T: AsRef<str>>(
&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<T: AsRef<str>>(
&mut self,
_renderer: &mut Self::Renderer,
_surface: &mut Self::Surface,
_viewport: &Viewport,
_background_color: Color,
_overlay: &[T],