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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/gl_renderer.h" 5 #include "cc/gl_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 void GLRenderer::releaseRenderPassTextures() 199 void GLRenderer::releaseRenderPassTextures()
200 { 200 {
201 m_renderPassTextures.clear(); 201 m_renderPassTextures.clear();
202 } 202 }
203 203
204 void GLRenderer::viewportChanged() 204 void GLRenderer::viewportChanged()
205 { 205 {
206 m_isViewportChanged = true; 206 m_isViewportChanged = true;
207 } 207 }
208 208
209 void GLRenderer::clearFramebuffer(DrawingFrame& frame) 209 void GLRenderer::clearFramebuffer(DrawingFrame& frame, bool full)
210 { 210 {
211 if (full) {
212 GLC(m_context, m_context->clearColor(0, 0, 0, 0));
213 GLC(m_context, m_context->disable(GL_SCISSOR_TEST));
214 GLC(m_context, m_context->clear(GL_COLOR_BUFFER_BIT));
215 GLC(m_context, m_context->enable(GL_SCISSOR_TEST));
216 return;
217 }
218
211 // On DEBUG builds, opaque render passes are cleared to blue to easily see r egions that were not drawn on the screen. 219 // On DEBUG builds, opaque render passes are cleared to blue to easily see r egions that were not drawn on the screen.
212 if (frame.currentRenderPass->has_transparent_background) 220 if (frame.currentRenderPass->has_transparent_background)
213 GLC(m_context, m_context->clearColor(0, 0, 0, 0)); 221 GLC(m_context, m_context->clearColor(0, 0, 0, 0));
214 else 222 else
215 GLC(m_context, m_context->clearColor(0, 0, 1, 1)); 223 GLC(m_context, m_context->clearColor(0, 0, 1, 1));
216 224
217 #ifdef NDEBUG 225 #ifdef NDEBUG
218 if (frame.currentRenderPass->has_transparent_background) 226 if (frame.currentRenderPass->has_transparent_background)
219 #endif 227 #endif
220 m_context->clear(GL_COLOR_BUFFER_BIT); 228 m_context->clear(GL_COLOR_BUFFER_BIT);
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 1807
1800 releaseRenderPassTextures(); 1808 releaseRenderPassTextures();
1801 } 1809 }
1802 1810
1803 bool GLRenderer::isContextLost() 1811 bool GLRenderer::isContextLost()
1804 { 1812 {
1805 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); 1813 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR);
1806 } 1814 }
1807 1815
1808 } // namespace cc 1816 } // namespace cc
OLDNEW
« 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