summaryrefslogtreecommitdiffstats
path: root/graphics/src/backend.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/backend.rs')
-rw-r--r--graphics/src/backend.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/graphics/src/backend.rs b/graphics/src/backend.rs
index ae89da06..77bb650b 100644
--- a/graphics/src/backend.rs
+++ b/graphics/src/backend.rs
@@ -10,12 +10,8 @@ use std::borrow::Cow;
///
/// [`Renderer`]: crate::Renderer
pub trait Backend {
- /// Trims the measurements cache.
- ///
- /// This method is currently necessary to properly trim the text cache in
- /// `iced_wgpu` and `iced_glow` because of limitations in the text rendering
- /// pipeline. It will be removed in the future.
- fn trim_measurements(&mut self) {}
+ /// The custom kind of primitives this [`Backend`] supports.
+ type Primitive;
}
/// A graphics backend that supports text rendering.
@@ -50,7 +46,7 @@ pub trait Text {
font: Font,
bounds: Size,
shaping: text::Shaping,
- ) -> (f32, f32);
+ ) -> Size;
/// Tests whether the provided point is within the boundaries of [`Text`]
/// laid out with the given parameters, returning information about