Append renderer name to iced_test snapshots
This commit is contained in:
parent
175a53bc86
commit
5e5c7c85ad
7 changed files with 66 additions and 12 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue