summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@lich.io>2021-05-05 14:33:03 +0700
committerLibravatar Héctor Ramón <hector@lich.io>2021-05-05 14:33:30 +0700
commit3840b75beaa3925f3438a7b40f01aaac221b8206 (patch)
treefcfeeecbfdbb9fb8713466ad8e92c7fbb7e33a06 /graphics
parent6b4bf34bf94eed091eb89efa1bbb14e6bc68883e (diff)
downloadiced-3840b75beaa3925f3438a7b40f01aaac221b8206.tar.gz
iced-3840b75beaa3925f3438a7b40f01aaac221b8206.tar.bz2
iced-3840b75beaa3925f3438a7b40f01aaac221b8206.zip
Provide `compatible_surface` in `iced_wgpu::Compositor`
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/window/compositor.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs
index 0bc8cbc8..7d5d789b 100644
--- a/graphics/src/window/compositor.rs
+++ b/graphics/src/window/compositor.rs
@@ -17,7 +17,10 @@ pub trait Compositor: Sized {
type SwapChain;
/// Creates a new [`Compositor`].
- fn new(settings: Self::Settings) -> Result<(Self, Self::Renderer), Error>;
+ fn new<W: HasRawWindowHandle>(
+ settings: Self::Settings,
+ compatible_window: Option<&W>,
+ ) -> Result<(Self, Self::Renderer), Error>;
/// Crates a new [`Surface`] for the given window.
///