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

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

Issue 2728373004: Remove Float32ImageData and update ImageData for color management (Closed)
Patch Set: Addressing comments 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..58cca5532a0f580e9235b5681b6c5fc912621284 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;
Justin Novosad 2017/03/13 20:00:52 Whoops, looks like this attribute was accidentally
+ [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute ImageDataArray dataUnion;
+ [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute ImageDataColorSettings colorSettings;
};
« no previous file with comments | « third_party/WebKit/Source/core/html/ImageData.cpp ('k') | third_party/WebKit/Source/core/html/ImageDataColorSettings.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698