From 7289b6091b61b0aa448a756cfe32211c78a4cce0 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 9 Jan 2024 07:19:15 -0800 Subject: WIP raw-window-handle 0.6 --- graphics/src/compositor.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'graphics/src') diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs index b8b575b4..6a4c7909 100644 --- a/graphics/src/compositor.rs +++ b/graphics/src/compositor.rs @@ -4,11 +4,11 @@ use crate::{Error, Viewport}; use iced_core::Color; -use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle}; +use raw_window_handle::{HasDisplayHandle, HasWindowHandle}; use thiserror::Error; /// A graphics compositor that can draw to windows. -pub trait Compositor: Sized { +pub trait Compositor: Sized { /// The settings of the backend. type Settings: Default; @@ -19,9 +19,9 @@ pub trait Compositor: Sized { type Surface; /// Creates a new [`Compositor`]. - fn new( + fn new( settings: Self::Settings, - compatible_window: Option<&W>, + compatible_window: Option, ) -> Result; /// Creates a [`Self::Renderer`] for the [`Compositor`]. @@ -30,9 +30,9 @@ pub trait Compositor: Sized { /// Crates a new [`Surface`] for the given window. /// /// [`Surface`]: Self::Surface - fn create_surface( + fn create_surface( &mut self, - window: &W, + window: W, width: u32, height: u32, ) -> Self::Surface; -- cgit