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

Unified Diff: cc/gl_renderer.cc

Issue 12036091: Fixes a bug when the framebuffer is cleared with invalid scissor rect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some more clean up. Created 7 years, 11 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
Index: cc/gl_renderer.cc
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc
index de6cfc169e3ee1571ba0c8f3119cc7d3354b15fa..38da039f7456e37dea04e8779622bca75996cb37 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -206,8 +206,16 @@ void GLRenderer::viewportChanged()
m_isViewportChanged = true;
}
-void GLRenderer::clearFramebuffer(DrawingFrame& frame)
+void GLRenderer::clearFramebuffer(DrawingFrame& frame, bool full)
{
+ if (full) {
+ GLC(m_context, m_context->clearColor(0, 0, 0, 0));
+ GLC(m_context, m_context->disable(GL_SCISSOR_TEST));
+ GLC(m_context, m_context->clear(GL_COLOR_BUFFER_BIT));
+ GLC(m_context, m_context->enable(GL_SCISSOR_TEST));
+ return;
+ }
+
// On DEBUG builds, opaque render passes are cleared to blue to easily see regions that were not drawn on the screen.
if (frame.currentRenderPass->has_transparent_background)
GLC(m_context, m_context->clearColor(0, 0, 0, 0));
« cc/direct_renderer.cc ('K') | « cc/gl_renderer.h ('k') | cc/software_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698