Index: Source/core/html/HTMLCanvasElement.cpp |
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp |
index a8da6d7bd3d426c8ac8151fbf8e95ada0009ebc2..b7d7ea6041978e5d1772b67b313e4ea23605db30 100644 |
--- a/Source/core/html/HTMLCanvasElement.cpp |
+++ b/Source/core/html/HTMLCanvasElement.cpp |
@@ -592,8 +592,11 @@ void HTMLCanvasElement::ensureUnacceleratedImageBuffer() |
Image* HTMLCanvasElement::copiedImage() const |
{ |
if (!m_copiedImage && buffer()) { |
- if (m_context) |
+ if (m_context && m_context->is3d()) { |
+ toWebGLRenderingContext(m_context.get())->setSavingImage(true); |
m_context->paintRenderingResultsToCanvas(); |
+ toWebGLRenderingContext(m_context.get())->setSavingImage(false); |
+ } |
m_copiedImage = buffer()->copyImage(CopyBackingStore, Unscaled); |
updateExternallyAllocatedMemory(); |
} |