summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-08-20 20:32:04 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-08-20 20:32:04 +0700
commitfe0de182c57e3a434026b1937b9a02597263afc3 (patch)
treed0512e3eeef34312641c7795e3c2d761901d3c1c /graphics
parent8a7c91bcb2867e751819d780eb5c46546da18d9a (diff)
downloadiced-fe0de182c57e3a434026b1937b9a02597263afc3.tar.gz
iced-fe0de182c57e3a434026b1937b9a02597263afc3.tar.bz2
iced-fe0de182c57e3a434026b1937b9a02597263afc3.zip
Remove `SwapChain` associated type from `Compositor`
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/window/compositor.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs
index 20df8c8b..0cf11f31 100644
--- a/graphics/src/window/compositor.rs
+++ b/graphics/src/window/compositor.rs
@@ -16,9 +16,6 @@ pub trait Compositor: Sized {
/// The surface of the backend.
type Surface;
- /// The swap chain of the backend.
- type SwapChain;
-
/// Creates a new [`Compositor`].
fn new<W: HasRawWindowHandle>(
settings: Self::Settings,
@@ -37,12 +34,12 @@ pub trait Compositor: Sized {
///
/// [`SwapChain`]: Self::SwapChain
/// [`Surface`]: Self::Surface
- fn create_swap_chain(
+ fn configure_surface(
&mut self,
- surface: &Self::Surface,
+ surface: &mut Self::Surface,
width: u32,
height: u32,
- ) -> Self::SwapChain;
+ );
/// Draws the output primitives to the next frame of the given [`SwapChain`].
///
@@ -50,7 +47,6 @@ pub trait Compositor: Sized {
fn draw<T: AsRef<str>>(
&mut self,
renderer: &mut Self::Renderer,
- swap_chain: &mut Self::SwapChain,
surface: &mut Self::Surface,
viewport: &Viewport,
background_color: Color,