Chromium Code Reviews| 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 bee46e661fa85faed151a4f92cfdb62aa7729cfc..f2e7787d779413bc34b4a1db945985d2200310f9 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" |
| @@ -92,6 +93,19 @@ static inline ImageBitmapSource* toImageBitmapSourceInternal( |
| return value.getAsBlob(); |
| if (value.isImageData()) |
| return value.getAsImageData(); |
| + if (value.isFloat32ImageData()) { |
| + if (RuntimeEnabledFeatures::experimentalCanvasFeaturesEnabled() && |
| + (RuntimeEnabledFeatures::trueColorRenderingEnabled() || |
| + RuntimeEnabledFeatures::colorCorrectRenderingEnabled())) { |
| + return value.getAsFloat32ImageData(); |
| + } |
| + exceptionState.throwDOMException( |
|
Justin Novosad
2016/12/16 18:38:11
This should never be reached since the creation of
zakerinasab1
2016/12/19 19:57:39
Done.
|
| + V8TypeError, |
| + "Float32ImageData is still experimental. It needs one of " |
| + "enable-color-correct-rendering or enable-true-color-rendering flags " |
| + "besides enable-experimental-canvas-features flag to work."); |
| + } |
| + |
| if (value.isImageBitmap()) |
| return value.getAsImageBitmap(); |
| if (value.isOffscreenCanvas()) |