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; |