OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |