| 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)));
|
| +}
|
| +
|
| PassOwnPtr<uint8_t[]> ImageBitmap::copyBitmapData(AlphaDisposition alphaOp)
|
| {
|
| SkImageInfo info = SkImageInfo::Make(width(), height(), kRGBA_8888_SkColorType, (alphaOp == PremultiplyAlpha) ? kPremul_SkAlphaType : kUnpremul_SkAlphaType);
|
|
|