summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-03-07 23:39:55 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-07 23:39:55 +0100
commit2074757cdc65ec16eeb1c7a12a5ff3bb5ed00859 (patch)
tree43ea058c8b7d0b4a13f9fe3ad7015efeea94ed48 /graphics
parent1bb5a1b9a23e1c4739430ac87ca33b06c2f4d9df (diff)
parentecf42b97df85df25b1b825f37adfeb00f658f6ee (diff)
downloadiced-2074757cdc65ec16eeb1c7a12a5ff3bb5ed00859.tar.gz
iced-2074757cdc65ec16eeb1c7a12a5ff3bb5ed00859.tar.bz2
iced-2074757cdc65ec16eeb1c7a12a5ff3bb5ed00859.zip
Merge pull request #2313 from iced-rs/fix/wasm-block-on
Fix `block_on` in `iced_wgpu` hanging Wasm builds
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/compositor.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs
index 0188f4d8..91951a8e 100644
--- a/graphics/src/compositor.rs
+++ b/graphics/src/compositor.rs
@@ -6,6 +6,7 @@ use crate::core::Color;
use crate::futures::{MaybeSend, MaybeSync};
use raw_window_handle::{HasDisplayHandle, HasWindowHandle};
+use std::future::Future;
use thiserror::Error;
/// A graphics compositor that can draw to windows.
@@ -23,7 +24,7 @@ pub trait Compositor: Sized {
fn new<W: Window + Clone>(
settings: Self::Settings,
compatible_window: W,
- ) -> Result<Self, Error>;
+ ) -> impl Future<Output = Result<Self, Error>>;
/// Creates a [`Self::Renderer`] for the [`Compositor`].
fn create_renderer(&self) -> Self::Renderer;