| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 bool SoftwareRenderer::SwapBuffers() { | 117 bool SoftwareRenderer::SwapBuffers() { |
| 118 if (Settings().compositor_frame_message) | 118 if (Settings().compositor_frame_message) |
| 119 output_surface_->SendFrameToParentCompositor(&compositor_frame_); | 119 output_surface_->SendFrameToParentCompositor(&compositor_frame_); |
| 120 return true; | 120 return true; |
| 121 } | 121 } |
| 122 | 122 |
| 123 void SoftwareRenderer::ReceiveCompositorFrameAck( | 123 void SoftwareRenderer::ReceiveCompositorFrameAck( |
| 124 const CompositorFrameAck& ack) { | 124 const CompositorFrameAck& ack) { |
| 125 if (capabilities_.using_swap_complete_callback) | 125 if (capabilities_.using_swap_complete_callback) |
| 126 client_->OnSwapBuffersComplete(); | 126 client_->OnSwapBuffersComplete(); |
| 127 output_device_->ReclaimDIB(ack.last_content_dib); | 127 output_device_->ReclaimDIB(ack.last_dib_id); |
| 128 } | 128 } |
| 129 | 129 |
| 130 bool SoftwareRenderer::FlippedFramebuffer() const { | 130 bool SoftwareRenderer::FlippedFramebuffer() const { |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 | 133 |
| 134 void SoftwareRenderer::EnsureScissorTestEnabled() { | 134 void SoftwareRenderer::EnsureScissorTestEnabled() { |
| 135 is_scissor_enabled_ = true; | 135 is_scissor_enabled_ = true; |
| 136 SetClipRect(scissor_rect_); | 136 SetClipRect(scissor_rect_); |
| 137 } | 137 } |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 4 * rect.width()); | 415 4 * rect.width()); |
| 416 } | 416 } |
| 417 | 417 |
| 418 void SoftwareRenderer::SetVisible(bool visible) { | 418 void SoftwareRenderer::SetVisible(bool visible) { |
| 419 if (visible_ == visible) | 419 if (visible_ == visible) |
| 420 return; | 420 return; |
| 421 visible_ = visible; | 421 visible_ = visible; |
| 422 } | 422 } |
| 423 | 423 |
| 424 } // namespace cc | 424 } // namespace cc |
| OLD | NEW |