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

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

Issue 766333003: canvas: fix bugs on HTMLCanvasElement::copiedImage() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rephrase this test so that the expectations don't contain failure Created 6 years 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') | no next file » | 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 75ee8f0fb5da016dd0a79920f5026ed5a846465d..60a689dad55994344088e5857925eff053f10ec8 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -900,14 +900,14 @@ void WebGLRenderingContextBase::setIsHidden(bool hidden)
drawingBuffer()->setIsHidden(hidden);
}
-void WebGLRenderingContextBase::paintRenderingResultsToCanvas(SourceDrawingBuffer sourceBuffer)
+bool WebGLRenderingContextBase::paintRenderingResultsToCanvas(SourceDrawingBuffer sourceBuffer)
{
if (isContextLost())
- return;
+ return false;
bool mustClearNow = clearIfComposited() != Skipped;
if (!m_markedCanvasDirty && !mustClearNow)
- return;
+ return false;
canvas()->clearCopiedImage();
m_markedCanvasDirty = false;
@@ -921,10 +921,8 @@ void WebGLRenderingContextBase::paintRenderingResultsToCanvas(SourceDrawingBuffe
drawingBuffer()->paintRenderingResultsToCanvas(canvas()->buffer());
}
- if (m_framebufferBinding)
- webContext()->bindFramebuffer(GL_FRAMEBUFFER, objectOrZero(m_framebufferBinding.get()));
- else
- drawingBuffer()->bind();
+ restoreCurrentFramebuffer();
+ return true;
}
PassRefPtrWillBeRawPtr<ImageData> WebGLRenderingContextBase::paintRenderingResultsToImageData(SourceDrawingBuffer sourceBuffer)
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698