Split local state from Engine in iced_wgpu

This commit is contained in:
Héctor Ramón Jiménez 2025-03-24 01:28:39 +01:00
parent 4b075b9731
commit 576dd22733
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
22 changed files with 768 additions and 641 deletions

View file

@ -106,7 +106,12 @@ 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,
) -> impl Future<Output = Option<Self>>
where
Self: Sized;
/// Draws offscreen into a screenshot, returning a collection of
/// bytes representing the rendered pixels in RGBA order.