Append renderer name to iced_test snapshots

This commit is contained in:
Héctor Ramón Jiménez 2025-03-24 20:18:24 +01:00
parent 175a53bc86
commit 5e5c7c85ad
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 66 additions and 12 deletions

View file

@ -815,7 +815,12 @@ impl renderer::Headless for Renderer {
async fn new(
default_font: Font,
default_text_size: Pixels,
backend: Option<&str>,
) -> Option<Self> {
if backend.is_some_and(|backend| backend != "wgpu") {
return None;
}
let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor {
backends: wgpu::Backends::from_env()
.unwrap_or(wgpu::Backends::PRIMARY),
@ -862,6 +867,10 @@ impl renderer::Headless for Renderer {
Some(Self::new(engine, default_font, default_text_size))
}
fn name(&self) -> String {
"wgpu".to_owned()
}
fn screenshot(
&mut self,
size: Size<u32>,