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

Side by Side Diff: cc/software_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
« cc/direct_renderer.cc ('K') | « cc/software_renderer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/software_renderer.h" 5 #include "cc/software_renderer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/debug_border_draw_quad.h" 8 #include "cc/debug_border_draw_quad.h"
9 #include "cc/math_util.h" 9 #include "cc/math_util.h"
10 #include "cc/render_pass_draw_quad.h" 10 #include "cc/render_pass_draw_quad.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 setDrawViewportSize(framebufferRect.size()); 142 setDrawViewportSize(framebufferRect.size());
143 143
144 return true; 144 return true;
145 } 145 }
146 146
147 void SoftwareRenderer::setScissorTestRect(const gfx::Rect& scissorRect) 147 void SoftwareRenderer::setScissorTestRect(const gfx::Rect& scissorRect)
148 { 148 {
149 m_skCurrentCanvas->clipRect(gfx::RectToSkRect(scissorRect), SkRegion::kRepla ce_Op); 149 m_skCurrentCanvas->clipRect(gfx::RectToSkRect(scissorRect), SkRegion::kRepla ce_Op);
150 } 150 }
151 151
152 void SoftwareRenderer::clearFramebuffer(DrawingFrame& frame) 152 void SoftwareRenderer::clearFramebuffer(DrawingFrame& frame, bool full)
153 { 153 {
154 if (frame.currentRenderPass->has_transparent_background) { 154 if (frame.currentRenderPass->has_transparent_background) {
155 m_skCurrentCanvas->clear(SkColorSetARGB(0, 0, 0, 0)); 155 m_skCurrentCanvas->clear(SkColorSetARGB(0, 0, 0, 0));
156 } else { 156 } else {
157 #ifndef NDEBUG 157 #ifndef NDEBUG
158 // On DEBUG builds, opaque render passes are cleared to blue to easily s ee regions that were not drawn on the screen. 158 // On DEBUG builds, opaque render passes are cleared to blue to easily s ee regions that were not drawn on the screen.
159 m_skCurrentCanvas->clear(SkColorSetARGB(255, 0, 0, 255)); 159 m_skCurrentCanvas->clear(SkColorSetARGB(255, 0, 0, 255));
160 #endif 160 #endif
161 } 161 }
162 } 162 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 373
374 void SoftwareRenderer::setVisible(bool visible) 374 void SoftwareRenderer::setVisible(bool visible)
375 { 375 {
376 if (m_visible == visible) 376 if (m_visible == visible)
377 return; 377 return;
378 m_visible = visible; 378 m_visible = visible;
379 } 379 }
380 380
381 } // namespace cc 381 } // namespace cc
OLDNEW
« cc/direct_renderer.cc ('K') | « cc/software_renderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698