mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Implemented paint worklet rendering context.
This commit is contained in:
parent
d47de6ccfc
commit
328fb25a65
15 changed files with 547 additions and 110 deletions
|
@ -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>);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue