From d666e739cdcc2084c14593888867d40066c232fe Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 29 Jun 2023 18:23:11 +0200 Subject: Trim text measurements only before `layout` --- graphics/src/backend.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'graphics/src/backend.rs') diff --git a/graphics/src/backend.rs b/graphics/src/backend.rs index 77bb650b..59e95bf8 100644 --- a/graphics/src/backend.rs +++ b/graphics/src/backend.rs @@ -12,6 +12,13 @@ use std::borrow::Cow; pub trait Backend { /// The custom kind of primitives this [`Backend`] supports. type Primitive; + + /// 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) {} } /// A graphics backend that supports text rendering. -- cgit