| Index: Source/core/html/HTMLCanvasElement.cpp
|
| diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
|
| index 748984dd3c7bed4e4fcee948f5c9b2d721df15e8..d26a62603eb3cc1445b5e89e96f771e60cff03b0 100644
|
| --- a/Source/core/html/HTMLCanvasElement.cpp
|
| +++ b/Source/core/html/HTMLCanvasElement.cpp
|
| @@ -49,6 +49,7 @@
|
| #include "platform/graphics/GraphicsContextStateSaver.h"
|
| #include "platform/graphics/ImageBuffer.h"
|
| #include "platform/graphics/RecordingImageBufferSurface.h"
|
| +#include "platform/graphics/StaticBitmapImage.h"
|
| #include "platform/graphics/UnacceleratedImageBufferSurface.h"
|
| #include "platform/graphics/gpu/WebGLImageBufferSurface.h"
|
| #include "platform/transforms/AffineTransform.h"
|
| @@ -698,18 +699,17 @@ PassRefPtr<Image> HTMLCanvasElement::getSourceImageForCanvas(SourceImageMode mod
|
| return nullptr;
|
| }
|
|
|
| - if (mode == CopySourceImageIfVolatile) {
|
| - *status = NormalSourceImageStatus;
|
| - return copiedImage();
|
| - }
|
| -
|
| if (m_context && m_context->is3d()) {
|
| m_context->paintRenderingResultsToCanvas();
|
| *status = ExternalSourceImageStatus;
|
| +
|
| + // can't create SkImage from WebGLImageBufferSurface (contains only SkBitmap)
|
| + return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled);
|
| } else {
|
| *status = NormalSourceImageStatus;
|
| }
|
| - return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled);
|
| +
|
| + return StaticBitmapImage::create(m_imageBuffer->newImageSnapshot());
|
| }
|
|
|
| bool HTMLCanvasElement::wouldTaintOrigin(SecurityOrigin*) const
|
|
|