Merge branch 'master' into beacon

This commit is contained in:
Héctor Ramón Jiménez 2025-04-01 02:18:20 +02:00
commit e060129951
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
30 changed files with 915 additions and 633 deletions

View file

@ -106,7 +106,19 @@ impl Default for Style {
/// a window nor a compositor.
pub trait Headless {
/// Creates a new [`Headless`] renderer;
fn new(default_font: Font, default_text_size: Pixels) -> Self;
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.