Split text measurements cache from rendering cache
This speeds up layouting in the most common scenario considerably!
🎉
This commit is contained in:
parent
d4d14b68f4
commit
860a6923bb
9 changed files with 53 additions and 24 deletions
|
|
@ -22,7 +22,7 @@ impl text::Renderer for Renderer {
|
|||
};
|
||||
|
||||
let (width, height) = if let Some(bounds) =
|
||||
self.glyph_brush.borrow_mut().glyph_bounds(§ion)
|
||||
self.text_measurements.borrow_mut().glyph_bounds(§ion)
|
||||
{
|
||||
(bounds.width().ceil(), bounds.height().ceil())
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue