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
|
|
@ -26,6 +26,15 @@ mod windowed;
|
|||
pub use debugger::Debugger;
|
||||
pub use windowed::{Target, Windowed};
|
||||
|
||||
pub trait Renderer {
|
||||
use crate::{layout, Element};
|
||||
|
||||
pub trait Renderer: Sized {
|
||||
type Output;
|
||||
|
||||
fn layout<'a, Message>(
|
||||
&mut self,
|
||||
element: &Element<'a, Message, Self>,
|
||||
) -> layout::Node {
|
||||
element.layout(self, &layout::Limits::NONE)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue