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/output/software_renderer.h" | 5 #include "cc/output/software_renderer.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 void SoftwareRenderer::EnsureScissorTestDisabled() { | 121 void SoftwareRenderer::EnsureScissorTestDisabled() { |
122 // There is no explicit notion of enabling/disabling scissoring in software | 122 // There is no explicit notion of enabling/disabling scissoring in software |
123 // rendering, but the underlying effect we want is to clear any existing | 123 // rendering, but the underlying effect we want is to clear any existing |
124 // clipRect on the current SkCanvas. This is done by setting clipRect to | 124 // clipRect on the current SkCanvas. This is done by setting clipRect to |
125 // the viewport's dimensions. | 125 // the viewport's dimensions. |
126 is_scissor_enabled_ = false; | 126 is_scissor_enabled_ = false; |
127 SkDevice* device = current_canvas_->getDevice(); | 127 SkDevice* device = current_canvas_->getDevice(); |
128 SetClipRect(gfx::Rect(device->width(), device->height())); | 128 SetClipRect(gfx::Rect(device->width(), device->height())); |
129 } | 129 } |
130 | 130 |
131 void SoftwareRenderer::Finish() {} | 131 //void SoftwareRenderer::Finish() {} |
132 | 132 |
133 void SoftwareRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { | 133 void SoftwareRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { |
134 current_framebuffer_lock_.reset(); | 134 current_framebuffer_lock_.reset(); |
135 current_canvas_ = root_canvas_; | 135 current_canvas_ = root_canvas_; |
136 } | 136 } |
137 | 137 |
138 bool SoftwareRenderer::BindFramebufferToTexture( | 138 bool SoftwareRenderer::BindFramebufferToTexture( |
139 DrawingFrame* frame, | 139 DrawingFrame* frame, |
140 const ScopedResource* texture, | 140 const ScopedResource* texture, |
141 gfx::Rect target_rect) { | 141 gfx::Rect target_rect) { |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 4 * rect.width()); | 472 4 * rect.width()); |
473 } | 473 } |
474 | 474 |
475 void SoftwareRenderer::SetVisible(bool visible) { | 475 void SoftwareRenderer::SetVisible(bool visible) { |
476 if (visible_ == visible) | 476 if (visible_ == visible) |
477 return; | 477 return; |
478 visible_ = visible; | 478 visible_ = visible; |
479 } | 479 } |
480 | 480 |
481 } // namespace cc | 481 } // namespace cc |
OLD | NEW |