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

Unified Diff: third_party/WebKit/Source/core/html/ImageData.idl

Issue 2728373004: Remove Float32ImageData and update ImageData for color management (Closed)
Patch Set: Fixing interface listings Created 3 years, 9 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/ImageData.idl
diff --git a/third_party/WebKit/Source/core/html/ImageData.idl b/third_party/WebKit/Source/core/html/ImageData.idl
index 38051b047cbef49ce98acf3098f6448f702079d7..96bb2dd195a790ee512e86613ec19dbe724bb877 100644
--- a/third_party/WebKit/Source/core/html/ImageData.idl
+++ b/third_party/WebKit/Source/core/html/ImageData.idl
@@ -29,7 +29,7 @@
// https://html.spec.whatwg.org/#dom-imagedata
// https://github.com/junov/CanvasColorSpace/blob/master/CanvasColorSpaceProposal.md#imagedata
-enum ImageDataColorSpace { "legacy-srgb", "srgb", "linear-rgb" };
+typedef (Uint8ClampedArray or Uint16Array or Float32Array) ImageDataArray;
[
Constructor(unsigned long sw, unsigned long sh),
@@ -38,12 +38,18 @@ enum ImageDataColorSpace { "legacy-srgb", "srgb", "linear-rgb" };
RaisesException=Constructor,
] interface ImageData {
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(unsigned long sw, unsigned long sh, ImageDataColorSpace colorSpace);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(Uint8ClampedArray data, unsigned long sw, ImageDataColorSpace colorSpace);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(Uint8ClampedArray data, unsigned long sw, unsigned long sh, ImageDataColorSpace colorSpace);
+ // The following createImageData functions are used instead of the regular constructors
+ // as currently Blink IDL does not allow to put custom constructors behind a flag
+ // (crbug.com/672978). These must be replaced with regular constructor declaration
+ // as specified in the proposal before shipping.
+ // https://github.com/WICG/canvas-color-space/blob/master/CanvasColorSpaceProposal.md
+
+ [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(unsigned long sw, unsigned long sh, ImageDataColorSettings imageDataColorSettings);
+ [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(ImageDataArray data, unsigned long sw, unsigned long sh, ImageDataColorSettings imageDataColorSettings);
readonly attribute unsigned long width;
readonly attribute unsigned long height;
readonly attribute Uint8ClampedArray data;
- readonly attribute ImageDataColorSpace colorSpace;
+ [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute ImageDataArray dataUnion;
Justin Novosad 2017/03/10 20:30:26 Great that you figured out how to make this work!
zakerinasab 2017/03/13 15:43:27 A new layout test added to print out a performance
+ [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute ImageDataColorSettings colorAttributes;
Justin Novosad 2017/03/10 20:30:26 perhaps this should be called "settings"?
zakerinasab 2017/03/13 15:43:27 My intuition was that you try to apply "settings",
};

Powered by Google App Engine
This is Rietveld 408576698