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

@ -109,10 +109,17 @@ pub trait Headless {
fn new(
default_font: Font,
default_text_size: Pixels,
backend: Option<&str>,
) -> impl Future<Output = Option<Self>>
where
Self: Sized;
/// Returns the unique name of the renderer.
///
/// This name may be used by testing libraries to uniquely identify
/// snapshots.
fn name(&self) -> String;
/// Draws offscreen into a screenshot, returning a collection of
/// bytes representing the rendered pixels in RGBA order.
fn screenshot(