Commit b3c52873 authored by xlai's avatar xlai Committed by Commit Bot

Put OffscreenCanvas under a new flag

OffscreenCanvas will now be turned on when Experimental Web Platform Features
is enabled, instead of being turned on when Experimental Canvas Features flag
is enabled.

Bug: 803941
TBR: junov@chromium.org,mcasas@chromium.org
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Idaefadc28f631f0997af5378a0950912faf8aec4
Reviewed-on: https://chromium-review.googlesource.com/937811
Commit-Queue: Olivia Lai <xlai@chromium.org>
Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539849}
parent c145105d
......@@ -71,7 +71,7 @@ class WebRtcCaptureFromElementBrowserTest
switches::autoplay::kNoUserGestureRequiredPolicy);
// Allow experimental canvas features.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableExperimentalCanvasFeatures);
switches::kEnableExperimentalWebPlatformFeatures);
// Allow window.internals for simulating context loss.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kExposeInternalsForTesting);
......
......@@ -378,7 +378,6 @@ def GpuRasterizationPages(base_name):
# Pages that should be run with experimental canvas features.
def ExperimentalCanvasFeaturesPages(base_name):
browser_args = [
'--enable-experimental-canvas-features',
'--enable-experimental-web-platform-features'] # for lowLatency
unaccelerated_args = [
'--disable-accelerated-2d-canvas',
......
......@@ -39,7 +39,7 @@ enum FontFaceLoadStatus {
[
ActiveScriptWrappable,
Exposed(Window StableBlinkFeatures, Worker ExperimentalCanvasFeatures),
Exposed(Window StableBlinkFeatures, Worker OffscreenCanvasText),
// FIXME: This should be (DOMString or BinaryData), where BinaryData is typedef of (ArrayBuffer or ArrayBufferView)
Constructor(DOMString family, (DOMString or ArrayBuffer or ArrayBufferView) source, optional FontFaceDescriptors descriptors),
ConstructorCallWith=ExecutionContext,
......
......@@ -36,7 +36,7 @@ enum FontFaceSetLoadStatus { "loading", "loaded" };
// [NoInterfaceObject]
[
NoInterfaceObject,
Exposed(Window StableBlinkFeatures, Worker ExperimentalCanvasFeatures)
Exposed(Window StableBlinkFeatures, Worker OffscreenCanvasText)
] interface FontFaceSet : EventTarget {
setlike<FontFace>;
......
......@@ -7,7 +7,7 @@
[
Constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long height),
Exposed=(Window,Worker),
RuntimeEnabled=ExperimentalCanvasFeatures,
RuntimeEnabled=OffscreenCanvas,
MeasureAs=OffscreenCanvas
] interface OffscreenCanvas : EventTarget {
[EnforceRange] attribute unsigned long width;
......
......@@ -67,7 +67,7 @@
[Replaceable] readonly attribute DOMString origin;
// TODO(fserb): temporarly until we can enable the interface below.
[RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute FontFaceSet fonts;
[RuntimeEnabled=OffscreenCanvasText] readonly attribute FontFaceSet fonts;
};
......
......@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
[
Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures)
Exposed(Worker OffscreenCanvas, Window StableBlinkFeatures)
] interface CanvasGradient {
[RaisesException] void addColorStop(float offset, DOMString color);
......
......@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
[
Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures)
Exposed(Worker OffscreenCanvas, Window StableBlinkFeatures)
] interface CanvasPattern {
[RuntimeEnabled=ExperimentalCanvasFeatures,Exposed=Window] void setTransform(SVGMatrix transform);
......
......@@ -32,7 +32,7 @@
Constructor,
Constructor(Path2D path),
Constructor(DOMString text),
Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures, PaintWorklet CSSPaintAPI)
Exposed(Worker OffscreenCanvas, Window StableBlinkFeatures, PaintWorklet CSSPaintAPI)
] interface Path2D {
[RuntimeEnabled=ExperimentalCanvasFeatures] void addPath(Path2D path, optional SVGMatrix? transform);
......
......@@ -20,5 +20,5 @@ typedef (CanvasRenderingContext2D or
// (and is not undefined or null). The binding must ignore this.
// Related spec issue: https://github.com/whatwg/html/issues/595
[RaisesException] RenderingContext? getContext(DOMString contextId, [PermissiveDictionaryConversion] optional CanvasContextCreationAttributesModule attributes);
[RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException, MeasureAs=OffscreenCanvas] OffscreenCanvas transferControlToOffscreen();
[RuntimeEnabled=OffscreenCanvas, RaisesException, MeasureAs=OffscreenCanvas] OffscreenCanvas transferControlToOffscreen();
};
......@@ -12,5 +12,5 @@ enum OffscreenRenderingContextType { "2d", "webgl", "webgl2" };
[
ImplementedAs=OffscreenCanvasModule
] partial interface OffscreenCanvas {
[CallWith=ExecutionContext, RaisesException, RuntimeEnabled=ExperimentalCanvasFeatures] OffscreenRenderingContext? getContext(OffscreenRenderingContextType contextType, optional CanvasContextCreationAttributesModule attributes);
[CallWith=ExecutionContext, RaisesException, RuntimeEnabled=OffscreenCanvas] OffscreenRenderingContext? getContext(OffscreenRenderingContextType contextType, optional CanvasContextCreationAttributesModule attributes);
};
......@@ -6,7 +6,7 @@
[
Exposed=(Window,Worker),
RuntimeEnabled=ExperimentalCanvasFeatures
RuntimeEnabled=OffscreenCanvas
] interface OffscreenCanvasRenderingContext2D {
// back-reference to the canvas
[ImplementedAs=offscreenCanvasForBinding] readonly attribute OffscreenCanvas canvas;
......
......@@ -6,7 +6,7 @@
[
DoNotCheckConstants,
Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures)
Exposed(Worker OffscreenCanvas, Window StableBlinkFeatures)
] interface WebGL2RenderingContext { };
WebGL2RenderingContext implements WebGLRenderingContextBase;
WebGL2RenderingContext implements WebGL2RenderingContextBase;
......@@ -27,6 +27,6 @@
[
DoNotCheckConstants,
Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures)
Exposed(Worker OffscreenCanvas, Window StableBlinkFeatures)
] interface WebGLRenderingContext { };
WebGLRenderingContext implements WebGLRenderingContextBase;
......@@ -705,7 +705,7 @@ typedef unrestricted float GLclampf;
void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
[RuntimeEnabled=ExperimentalCanvasFeatures, CallWith=ScriptState, RaisesException] Promise commit();
[RuntimeEnabled=OffscreenCanvas, CallWith=ScriptState, RaisesException] Promise commit();
// WebXR Device API support
[RuntimeEnabled=WebXR, SecureContext, CallWith=ScriptState] Promise setCompatibleXRDevice(XRDevice device);
......
......@@ -725,6 +725,14 @@
name: "NullableDocumentDomain",
status: "experimental",
},
{
name: "OffscreenCanvas",
status: "experimental",
},
{
name: "OffscreenCanvasText",
status: "experimental",
},
{
name: "OnDeviceChange",
status: "stable",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment