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

Side by Side Diff: cc/software_renderer.cc

Issue 11378004: Remove DirectRenderer::disableScissorTest, always leave GL_SCISSOR_TEST enabled in GlRenderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/gl_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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/software_renderer.h" 7 #include "cc/software_renderer.h"
8 8
9 #include "cc/debug_border_draw_quad.h" 9 #include "cc/debug_border_draw_quad.h"
10 #include "cc/render_pass_draw_quad.h" 10 #include "cc/render_pass_draw_quad.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 setDrawViewportSize(framebufferRect.size()); 136 setDrawViewportSize(framebufferRect.size());
137 137
138 return true; 138 return true;
139 } 139 }
140 140
141 void SoftwareRenderer::enableScissorTestRect(const gfx::Rect& scissorRect) 141 void SoftwareRenderer::enableScissorTestRect(const gfx::Rect& scissorRect)
142 { 142 {
143 m_skCurrentCanvas->clipRect(toSkRect(scissorRect), SkRegion::kReplace_Op); 143 m_skCurrentCanvas->clipRect(toSkRect(scissorRect), SkRegion::kReplace_Op);
144 } 144 }
145 145
146 void SoftwareRenderer::disableScissorTest()
147 {
148 gfx::Rect canvasRect(gfx::Point(), viewportSize());
149 m_skCurrentCanvas->clipRect(toSkRect(canvasRect), SkRegion::kReplace_Op);
150 }
151
152 void SoftwareRenderer::clearFramebuffer(DrawingFrame& frame) 146 void SoftwareRenderer::clearFramebuffer(DrawingFrame& frame)
153 { 147 {
154 if (frame.currentRenderPass->hasTransparentBackground()) { 148 if (frame.currentRenderPass->hasTransparentBackground()) {
155 m_skCurrentCanvas->clear(SkColorSetARGB(0, 0, 0, 0)); 149 m_skCurrentCanvas->clear(SkColorSetARGB(0, 0, 0, 0));
156 } else { 150 } else {
157 #ifndef NDEBUG 151 #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. 152 // 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)); 153 m_skCurrentCanvas->clear(SkColorSetARGB(255, 0, 0, 255));
160 #endif 154 #endif
161 } 155 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 358 }
365 359
366 void SoftwareRenderer::setVisible(bool visible) 360 void SoftwareRenderer::setVisible(bool visible)
367 { 361 {
368 if (m_visible == visible) 362 if (m_visible == visible)
369 return; 363 return;
370 m_visible = visible; 364 m_visible = visible;
371 } 365 }
372 366
373 } // namespace cc 367 } // namespace cc
OLDNEW
« cc/gl_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