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

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: Fixing layout 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..56bf5517e34e49d090e26fd229ddd48834ec7707 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl
@@ -21,14 +21,29 @@
//
// N.B.: Web IDL doesn't support multiple inheritance of dictionaries.
+enum CanvasColorSpace {
+ "legacy-srgb", // default
Justin Novosad 2017/02/23 18:48:13 The revised proposal removes legacy srgb. Basical
zakerinasab 2017/02/23 20:22:33 Done.
+ "srgb",
+ "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