Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 309933004: Fix imageSourceURL() for WebGL elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.h ('k') | Source/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.h ('k') | Source/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698