mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
layout: Load Web fonts asynchronously.
Improves page load times significantly. Closes #7343.
This commit is contained in:
parent
9523283c14
commit
9bb6acd690
8 changed files with 216 additions and 35 deletions
|
@ -51,6 +51,9 @@ pub enum Msg {
|
|||
/// Requests that the layout task render the next frame of all animations.
|
||||
TickAnimations,
|
||||
|
||||
/// Requests that the layout task reflow with a newly-loaded Web font.
|
||||
ReflowWithNewlyLoadedWebFont,
|
||||
|
||||
/// Updates the layout visible rects, affecting the area that display lists will be constructed
|
||||
/// for.
|
||||
SetVisibleRects(Vec<(LayerId, Rect<Au>)>),
|
||||
|
@ -76,6 +79,10 @@ pub enum Msg {
|
|||
/// Get the last epoch counter for this layout task.
|
||||
GetCurrentEpoch(IpcSender<Epoch>),
|
||||
|
||||
/// Asks the layout task whether any Web fonts have yet to load (if true, loads are pending;
|
||||
/// false otherwise).
|
||||
GetWebFontLoadState(IpcSender<bool>),
|
||||
|
||||
/// Creates a new layout task.
|
||||
///
|
||||
/// This basically exists to keep the script-layout dependency one-way.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue