summaryrefslogtreecommitdiffstats
path: root/graphics/src/compositor.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-05-11 16:45:08 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-11 16:45:08 +0200
commit669f7cc74b2e7918e86a8197916f503f2d3d9b93 (patch)
treeacb365358235be6ce115b50db9404d890b6e77a6 /graphics/src/compositor.rs
parentbc62013b6cde52174bf4c4286939cf170bfa7760 (diff)
parent63d3fc6996b848e10e77e6924bfebdf6ba82852e (diff)
downloadiced-669f7cc74b2e7918e86a8197916f503f2d3d9b93.tar.gz
iced-669f7cc74b2e7918e86a8197916f503f2d3d9b93.tar.bz2
iced-669f7cc74b2e7918e86a8197916f503f2d3d9b93.zip
Merge pull request #1830 from iced-rs/advanced-text
Advanced text
Diffstat (limited to '')
-rw-r--r--graphics/src/compositor.rs (renamed from graphics/src/window/compositor.rs)8
1 files changed, 6 insertions, 2 deletions
diff --git a/graphics/src/window/compositor.rs b/graphics/src/compositor.rs
index db4ba45d..d55e801a 100644
--- a/graphics/src/window/compositor.rs
+++ b/graphics/src/compositor.rs
@@ -1,6 +1,8 @@
//! A compositor is responsible for initializing a renderer and managing window
//! surfaces.
-use crate::{Color, Error, Viewport};
+use crate::{Error, Viewport};
+
+use iced_core::Color;
use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
use thiserror::Error;
@@ -11,7 +13,7 @@ pub trait Compositor: Sized {
type Settings: Default;
/// The iced renderer of the backend.
- type Renderer: iced_native::Renderer;
+ type Renderer: iced_core::Renderer;
/// The surface of the backend.
type Surface;
@@ -28,6 +30,8 @@ pub trait Compositor: Sized {
fn create_surface<W: HasRawWindowHandle + HasRawDisplayHandle>(
&mut self,
window: &W,
+ width: u32,
+ height: u32,
) -> Self::Surface;
/// Configures a new [`Surface`] with the given dimensions.