Implemented paint worklet rendering context.

This commit is contained in:
Alan Jeffrey 2017-06-09 12:47:39 -05:00
parent d47de6ccfc
commit 328fb25a65
15 changed files with 547 additions and 110 deletions

View file

@ -41,6 +41,7 @@ pub mod webdriver_msg;
use app_units::Au;
use bluetooth_traits::BluetoothRequest;
use canvas_traits::CanvasData;
use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId};
use euclid::{Size2D, Length, Point2D, Vector2D, Rect, ScaleFactor, TypedSize2D};
use gfx_traits::Epoch;
@ -826,12 +827,12 @@ impl From<RecvTimeoutError> for PaintWorkletError {
}
}
/// Execute paint code in the worklet thread pool.<
/// Execute paint code in the worklet thread pool.
pub trait PaintWorkletExecutor: Sync + Send {
/// https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image
fn draw_a_paint_image(&self,
name: Atom,
concrete_object_size: Size2D<Au>)
-> Result<Image, PaintWorkletError>;
concrete_object_size: Size2D<Au>,
sender: IpcSender<CanvasData>);
}