Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1365)

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl

Issue 2708403003: Implement canvas color space IDL format for 2D canvas (Closed)
Patch Set: Addressing GPU pixel test failures Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl b/third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl
index 5063c92163f2fff9a292c61ca80ba7058f2f8f36..752714c9933030067cfca095ed98cc013c442255 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl
@@ -21,14 +21,28 @@
//
// N.B.: Web IDL doesn't support multiple inheritance of dictionaries.
+enum CanvasColorSpace {
+ "srgb", // default
+ "rec2020",
+ "p3",
+};
-enum CanvasColorSpace { "legacy-srgb", "srgb", "linear-rgb", "rec-2020", "p3"};
+enum CanvasPixelFormat {
+ "8-8-8-8", // default
+ "10-10-10-2",
+ "12-12-12-12",
+ "float16",
+};
[PermissiveDictionaryConversion]
dictionary CanvasContextCreationAttributes {
// Canvas 2D attributes
boolean alpha = true; // Also used for WebGL.
+ // TODO(crbug.com/637288): Do we keep "legacy-srgb" as the default?
+ // Must decide before shipping.
[RuntimeEnabled=ExperimentalCanvasFeatures] CanvasColorSpace colorSpace = "legacy-srgb";
+ [RuntimeEnabled=ExperimentalCanvasFeatures] CanvasPixelFormat pixelFormat = "8-8-8-8";
+ [RuntimeEnabled=ExperimentalCanvasFeatures] boolean linearPixelMath = false;
// WebGL attributes
boolean depth = true;

Powered by Google App Engine
This is Rietveld 408576698