| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 current_canvas_ = NULL; | 112 current_canvas_ = NULL; |
| 113 root_canvas_ = NULL; | 113 root_canvas_ = NULL; |
| 114 if (Settings().compositor_frame_message) { | 114 if (Settings().compositor_frame_message) { |
| 115 compositor_frame_.metadata = client_->MakeCompositorFrameMetadata(); | 115 compositor_frame_.metadata = client_->MakeCompositorFrameMetadata(); |
| 116 output_device_->EndPaint(compositor_frame_.software_frame_data.get()); | 116 output_device_->EndPaint(compositor_frame_.software_frame_data.get()); |
| 117 } else { | 117 } else { |
| 118 output_device_->EndPaint(NULL); | 118 output_device_->EndPaint(NULL); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 void SoftwareRenderer::SwapBuffers(const LatencyInfo& latency_info) { | 122 void SoftwareRenderer::SwapBuffers(const ui::LatencyInfo& latency_info) { |
| 123 if (Settings().compositor_frame_message) | 123 if (Settings().compositor_frame_message) |
| 124 output_surface_->SendFrameToParentCompositor(&compositor_frame_); | 124 output_surface_->SendFrameToParentCompositor(&compositor_frame_); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void SoftwareRenderer::ReceiveCompositorFrameAck( | 127 void SoftwareRenderer::ReceiveCompositorFrameAck( |
| 128 const CompositorFrameAck& ack) { | 128 const CompositorFrameAck& ack) { |
| 129 output_device_->ReclaimDIB(ack.last_dib_id); | 129 output_device_->ReclaimDIB(ack.last_dib_id); |
| 130 } | 130 } |
| 131 | 131 |
| 132 bool SoftwareRenderer::FlippedFramebuffer() const { | 132 bool SoftwareRenderer::FlippedFramebuffer() const { |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 4 * rect.width()); | 468 4 * rect.width()); |
| 469 } | 469 } |
| 470 | 470 |
| 471 void SoftwareRenderer::SetVisible(bool visible) { | 471 void SoftwareRenderer::SetVisible(bool visible) { |
| 472 if (visible_ == visible) | 472 if (visible_ == visible) |
| 473 return; | 473 return; |
| 474 visible_ = visible; | 474 visible_ = visible; |
| 475 } | 475 } |
| 476 | 476 |
| 477 } // namespace cc | 477 } // namespace cc |
| OLD | NEW |