Trim text measurements only before layout

This commit is contained in:
Héctor Ramón Jiménez 2023-06-29 18:23:11 +02:00
parent cdce03cf7f
commit d666e739cd
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
4 changed files with 30 additions and 28 deletions

View file

@ -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.