Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp |
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
index 1159ad7039c4fcbee798f6101f5642deeb742ca0..f2ac80e6df4a8e21e51506bb63925ea883742a45 100644 |
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
@@ -518,6 +518,7 @@ WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCa |
, m_multisamplingObserverRegistered(false) |
, m_onePlusMaxEnabledAttribIndex(0) |
, m_onePlusMaxNonDefaultTextureUnit(0) |
+ , m_savingImage(false) |
{ |
ASSERT(context); |
@@ -841,6 +842,7 @@ void WebGLRenderingContextBase::paintRenderingResultsToCanvas() |
canvas()->makePresentationCopy(); |
} else |
canvas()->clearPresentationCopy(); |
+ |
clearIfComposited(); |
if (!m_markedCanvasDirty && !m_layerCleared) |
@@ -852,7 +854,7 @@ void WebGLRenderingContextBase::paintRenderingResultsToCanvas() |
ScopedTexture2DRestorer restorer(this); |
m_drawingBuffer->commit(); |
- if (!(canvas()->buffer())->copyRenderingResultsFromDrawingBuffer(m_drawingBuffer.get())) { |
+ if (!(canvas()->buffer())->copyRenderingResultsFromDrawingBuffer(m_drawingBuffer.get(), m_savingImage)) { |
canvas()->ensureUnacceleratedImageBuffer(); |
if (canvas()->hasImageBuffer()) |
m_drawingBuffer->paintRenderingResultsToCanvas(canvas()->buffer()); |