mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
FontContext: Cache data fetched from the cache thread
Before this change, if we needed to create a Font which we've already created, but at a new size, then we'd fetch the FontTemplateInfo again. If the bytes of the font are held in memory, then this could be expensive as we need to pass those bytes over IPC.
This commit is contained in:
parent
dc683a1fc9
commit
3025a269ec
4 changed files with 77 additions and 9 deletions
|
@ -32,7 +32,7 @@ pub struct FontTemplates {
|
|||
templates: Vec<FontTemplate>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct FontTemplateInfo {
|
||||
pub font_template: Arc<FontTemplateData>,
|
||||
pub font_key: webrender_api::FontKey,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue