| Index: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
|
| diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
|
| index 7509d86c81e6e5077057d91abf0426c203f29d31..9dc16fe3792d4b26a1c98ef6d5cd7be7dc1425b0 100644
|
| --- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
|
| +++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
|
| @@ -93,7 +93,10 @@ PassRefPtr<Image> OffscreenCanvas::getSourceImageForCanvas(
|
| const FloatSize& size) const {
|
| if (!m_context) {
|
| *status = InvalidSourceImageStatus;
|
| - return nullptr;
|
| + sk_sp<SkSurface> surface =
|
| + SkSurface::MakeRasterN32Premul(m_size.width(), m_size.height());
|
| + return surface ? StaticBitmapImage::create(surface->makeImageSnapshot())
|
| + : nullptr;
|
| }
|
| if (!size.width() || !size.height()) {
|
| *status = ZeroSizeCanvasSourceImageStatus;
|
|
|