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

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp

Issue 2555213002: Implement color management for ImageData (Closed)
Patch Set: Addressing comments. Created 4 years 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/imagebitmap/ImageBitmapFactories.cpp
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
index 0e3afe2aae2e4ea0c4730edfdaa232d5cf3a63d5..59a7aa6c6163a9cf90c82636caf77d1426f02955 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -37,6 +37,7 @@
#include "core/frame/ImageBitmap.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/UseCounter.h"
+#include "core/html/Float32ImageData.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLVideoElement.h"
@@ -91,6 +92,11 @@ static inline ImageBitmapSource* toImageBitmapSourceInternal(
return value.getAsBlob();
if (value.isImageData())
return value.getAsImageData();
+ if (RuntimeEnabledFeatures::trueColorRenderingEnabled() ||
+ RuntimeEnabledFeatures::colorCorrectRenderingEnabled()) {
+ if (value.isFloat32ImageData())
Justin Novosad 2016/12/08 20:58:59 Would be useful to give helpful guidance to devs t
zakerinasab 2016/12/08 22:13:52 Done.
+ return value.getAsFloat32ImageData();
+ }
if (value.isImageBitmap())
return value.getAsImageBitmap();
ASSERT_NOT_REACHED();

Powered by Google App Engine
This is Rietveld 408576698