Implemented paint worklets invoking worklet scripts.

This commit is contained in:
Alan Jeffrey 2017-06-05 13:49:27 -05:00
parent 9a13cf6bda
commit 3db4761767
20 changed files with 575 additions and 19 deletions

View file

@ -0,0 +1,19 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://drafts.css-houdini.org/css-paint-api/#paintrenderingcontext2d
[Exposed=PaintWorklet]
interface PaintRenderingContext2D {
};
// PaintRenderingContext2D implements CanvasState;
// PaintRenderingContext2D implements CanvasTransform;
// PaintRenderingContext2D implements CanvasCompositing;
// PaintRenderingContext2D implements CanvasImageSmoothing;
// PaintRenderingContext2D implements CanvasFillStrokeStyles;
// PaintRenderingContext2D implements CanvasShadowStyles;
// PaintRenderingContext2D implements CanvasRect;
// PaintRenderingContext2D implements CanvasDrawPath;
// PaintRenderingContext2D implements CanvasDrawImage;
// PaintRenderingContext2D implements CanvasPathDrawingStyles;
// PaintRenderingContext2D implements CanvasPath;

View file

@ -0,0 +1,10 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://drafts.css-houdini.org/css-paint-api/#paintsize
[Exposed=PaintWorklet]
interface PaintSize {
readonly attribute double width;
readonly attribute double height;
};

View file

@ -5,5 +5,5 @@
// https://drafts.css-houdini.org/css-paint-api/#paintworkletglobalscope
[Global=(Worklet,PaintWorklet), Exposed=PaintWorklet]
interface PaintWorkletGlobalScope : WorkletGlobalScope {
void registerPaint(DOMString name, VoidFunction paintCtor);
[Throws] void registerPaint(DOMString name, VoidFunction paintCtor);
};