Introduce MainThreadScriptMsg::RegisterPaintWorklet

This avoids the need for a generic task to send messages to the layout thread
through the main script thread.
This commit is contained in:
Anthony Ramine 2017-09-17 09:57:12 +02:00
parent 95dc54d216
commit f58207b851
4 changed files with 67 additions and 39 deletions

View file

@ -860,6 +860,12 @@ pub trait Painter: SpeculativePainter {
-> DrawAPaintImageResult;
}
impl fmt::Debug for Painter {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_tuple("Painter").field(&format_args!("..")).finish()
}
}
/// The result of executing paint code: the image together with any image URLs that need to be loaded.
/// TODO: this should return a WR display list. https://github.com/servo/servo/issues/17497
#[derive(Clone, Debug, Deserialize, HeapSizeOf, Serialize)]