Chromium Code Reviews| 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..3ff4fe1fab70d5afa179a017448541b9773dd6ae 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.leakPtr()))); |
|
Reilly Grant (use Gerrit)
2016/04/25 22:37:33
I think you just want SkImage::NewFromBitmap(*bitm
mcasas
2016/04/27 00:51:29
Done.
|
| + |
| + return ImageBitmap::create(image.release()); |
|
Reilly Grant (use Gerrit)
2016/04/25 22:37:33
It shouldn't be necessary to call release here. Th
mcasas
2016/04/27 00:51:28
Done.
|
| +} |
| + |
| PassOwnPtr<uint8_t[]> ImageBitmap::copyBitmapData(AlphaDisposition alphaOp) |
| { |
| SkImageInfo info = SkImageInfo::Make(width(), height(), kRGBA_8888_SkColorType, (alphaOp == PremultiplyAlpha) ? kPremul_SkAlphaType : kUnpremul_SkAlphaType); |