Index: third_party/WebKit/Source/core/frame/ImageBitmap.cpp |
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp |
index 62de013040fc6482f6dc4be6e11273456b045b58..030f89640ef5fd937a18e87847908c40100e3fb9 100644 |
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp |
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp |
@@ -7,6 +7,7 @@ |
#include "core/html/HTMLCanvasElement.h" |
#include "core/html/HTMLVideoElement.h" |
#include "core/html/ImageData.h" |
+#include "platform/graphics/skia/SkiaUtils.h" |
#include "platform/image-decoders/ImageDecoder.h" |
#include "third_party/skia/include/core/SkSurface.h" |
#include "wtf/RefPtr.h" |
@@ -402,6 +403,12 @@ void ImageBitmap::close() |
m_isNeutered = true; |
} |
+// static |
+ImageBitmap* ImageBitmap::take(ScriptPromiseResolver*, sk_sp<SkImage> image) |
+{ |
+ return ImageBitmap::create(StaticBitmapImage::create(fromSkSp(image))); |
Justin Novosad
2016/04/27 15:03:17
You must determine whether 'image' is tainted with
mcasas
2016/04/27 17:48:18
|image| comes from a MediaStream so it's origin is
|
+} |
+ |
PassOwnPtr<uint8_t[]> ImageBitmap::copyBitmapData(AlphaDisposition alphaOp) |
{ |
SkImageInfo info = SkImageInfo::Make(width(), height(), kRGBA_8888_SkColorType, (alphaOp == PremultiplyAlpha) ? kPremul_SkAlphaType : kUnpremul_SkAlphaType); |