Re-use tessellator between frames

This commit is contained in:
2025-06-21 17:20:00 +02:00
parent 6b5bbfbc54
commit 43afb9dfd3
2 changed files with 103 additions and 75 deletions

View File

@ -30,7 +30,7 @@ pub struct FileEditor {
#[derive(serde::Deserialize, serde::Serialize)]
pub enum BufferItem {
Text(MdTextEdit),
Handwriting(Handwriting),
Handwriting(Box<Handwriting>),
}
impl FileEditor {
@ -297,7 +297,7 @@ impl From<&str> for FileEditor {
}
}
};
buffer.push(BufferItem::Handwriting(handwriting))
buffer.push(BufferItem::Handwriting(Box::new(handwriting)))
}
Err(e) => {
log::error!("Failed to decode handwriting {content:?}: {e}");