Reuse entries in text::Cache in iced_wgpu

This commit is contained in:
Héctor Ramón Jiménez 2023-06-28 00:35:37 +02:00
parent af62ec1c87
commit 78ad365db2
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
10 changed files with 69 additions and 46 deletions

View file

@ -38,7 +38,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

View file

@ -133,7 +133,7 @@ where
font: Font,
bounds: Size,
shaping: text::Shaping,
) -> (f32, f32) {
) -> Size {
self.backend().measure(
content,
size,