mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -113,8 +113,6 @@ impl UntrustedNodeAddress {
|
|||
/// Messages sent to layout from the constellation and/or compositor.
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum LayoutControlMsg {
|
||||
/// Requests that this layout clean up before exit.
|
||||
ExitNow,
|
||||
/// Tells layout about the new scrolling offsets of each scrollable stacking context.
|
||||
SetScrollStates(Vec<ScrollState>),
|
||||
/// Send the paint time for a specific epoch to layout.
|
||||
|
@ -395,8 +393,6 @@ pub enum ConstellationControlMsg {
|
|||
SetWebGPUPort(IpcReceiver<WebGPUMsg>),
|
||||
/// A mesage for a layout from the constellation.
|
||||
ForLayoutFromConstellation(LayoutControlMsg, PipelineId),
|
||||
/// A message for a layout from the font cache.
|
||||
ForLayoutFromFontCache(PipelineId),
|
||||
}
|
||||
|
||||
impl fmt::Debug for ConstellationControlMsg {
|
||||
|
@ -436,7 +432,6 @@ impl fmt::Debug for ConstellationControlMsg {
|
|||
MediaSessionAction(..) => "MediaSessionAction",
|
||||
SetWebGPUPort(..) => "SetWebGPUPort",
|
||||
ForLayoutFromConstellation(..) => "ForLayoutFromConstellation",
|
||||
ForLayoutFromFontCache(..) => "ForLayoutFromFontCache",
|
||||
};
|
||||
write!(formatter, "ConstellationControlMsg::{}", variant)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue