| 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..3e8e8cce0649f59f4e98c6f8dc0b07bfc39cbd09 100644
|
| --- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
|
| @@ -402,6 +402,15 @@ void ImageBitmap::close()
|
| m_isNeutered = true;
|
| }
|
|
|
| +// static
|
| +ImageBitmap* ImageBitmap::take(ScriptPromiseResolver*, PassOwnPtr<SkBitmap> bitmap)
|
| +{
|
| + RefPtr<StaticBitmapImage> image = StaticBitmapImage::create(
|
| + adoptRef(SkImage::NewFromBitmap(*bitmap)));
|
| +
|
| + return ImageBitmap::create(image);
|
| +}
|
| +
|
| PassOwnPtr<uint8_t[]> ImageBitmap::copyBitmapData(AlphaDisposition alphaOp)
|
| {
|
| SkImageInfo info = SkImageInfo::Make(width(), height(), kRGBA_8888_SkColorType, (alphaOp == PremultiplyAlpha) ? kPremul_SkAlphaType : kUnpremul_SkAlphaType);
|
|
|