mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
fonts: Clean up messaging during web fonts loads (#32332)
Instead of sending a message to the script thread via IPC when a web font loads and then sending another, just give the `FontContext` a callback that send a single message to the script thread. This moves all the cache invalidation internally into `FontContext` as well. Additionally, the unused LayoutControlMessage::ExitNow enum variant is removed. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
d47c8ff2ae
commit
9f32809671
10 changed files with 150 additions and 205 deletions
|
@ -4,6 +4,8 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use range::{int_range_index, RangeIndex};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -14,3 +16,5 @@ int_range_index! {
|
|||
/// the middle of a glyph.
|
||||
struct ByteIndex(isize)
|
||||
}
|
||||
|
||||
pub type WebFontLoadFinishedCallback = Arc<dyn Fn(bool) + Send + Sync + 'static>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue