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 316d340d0bf159ad50a06f8032c4ad03143ffdbf..526b9fb656f544c1aa9ecb33fb014edb31cc774f 100644 |
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
@@ -8,6 +8,7 @@ |
#include "core/html/canvas/CanvasContextCreationAttributes.h" |
#include "core/html/canvas/CanvasRenderingContext.h" |
#include "core/html/canvas/CanvasRenderingContextFactory.h" |
+#include "platform/graphics/ImageBuffer.h" |
#include "wtf/MathExtras.h" |
#include <memory> |
@@ -109,6 +110,13 @@ bool OffscreenCanvas::originClean() const |
return m_originClean && !m_disableReadingFromCanvas; |
} |
+bool OffscreenCanvas::isPaintable() const |
+{ |
+ if (!m_context) |
+ return ImageBuffer::canCreateImageBuffer(m_size); |
+ return m_context->isPaintable(); |
+} |
+ |
DEFINE_TRACE(OffscreenCanvas) |
{ |
visitor->trace(m_context); |