| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 void SoftwareRenderer::SwapBuffers(const ui::LatencyInfo& latency_info) { | 109 void SoftwareRenderer::SwapBuffers(const ui::LatencyInfo& latency_info) { |
| 110 if (Settings().compositor_frame_message) | 110 if (Settings().compositor_frame_message) |
| 111 output_surface_->SendFrameToParentCompositor(&compositor_frame_); | 111 output_surface_->SendFrameToParentCompositor(&compositor_frame_); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void SoftwareRenderer::ReceiveCompositorFrameAck( | 114 void SoftwareRenderer::ReceiveCompositorFrameAck( |
| 115 const CompositorFrameAck& ack) { | 115 const CompositorFrameAck& ack) { |
| 116 output_device_->ReclaimDIB(ack.last_dib_id); | 116 output_device_->ReclaimSoftwareFrame(ack.last_software_frame_id); |
| 117 } | 117 } |
| 118 | 118 |
| 119 bool SoftwareRenderer::FlippedFramebuffer() const { | 119 bool SoftwareRenderer::FlippedFramebuffer() const { |
| 120 return false; | 120 return false; |
| 121 } | 121 } |
| 122 | 122 |
| 123 void SoftwareRenderer::EnsureScissorTestEnabled() { | 123 void SoftwareRenderer::EnsureScissorTestEnabled() { |
| 124 is_scissor_enabled_ = true; | 124 is_scissor_enabled_ = true; |
| 125 SetClipRect(scissor_rect_); | 125 SetClipRect(scissor_rect_); |
| 126 } | 126 } |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 4 * rect.width()); | 458 4 * rect.width()); |
| 459 } | 459 } |
| 460 | 460 |
| 461 void SoftwareRenderer::SetVisible(bool visible) { | 461 void SoftwareRenderer::SetVisible(bool visible) { |
| 462 if (visible_ == visible) | 462 if (visible_ == visible) |
| 463 return; | 463 return; |
| 464 visible_ = visible; | 464 visible_ = visible; |
| 465 } | 465 } |
| 466 | 466 |
| 467 } // namespace cc | 467 } // namespace cc |
| OLD | NEW |