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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 current_canvas_ = NULL; | 100 current_canvas_ = NULL; |
101 root_canvas_ = NULL; | 101 root_canvas_ = NULL; |
102 if (Settings().compositor_frame_message) { | 102 if (Settings().compositor_frame_message) { |
103 compositor_frame_.metadata = client_->MakeCompositorFrameMetadata(); | 103 compositor_frame_.metadata = client_->MakeCompositorFrameMetadata(); |
104 output_device_->EndPaint(compositor_frame_.software_frame_data.get()); | 104 output_device_->EndPaint(compositor_frame_.software_frame_data.get()); |
105 } else { | 105 } else { |
106 output_device_->EndPaint(NULL); | 106 output_device_->EndPaint(NULL); |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 void SoftwareRenderer::SwapBuffers(const LatencyInfo& latency_info) { | 110 void SoftwareRenderer::SwapBuffers(const ui::LatencyInfo& latency_info) { |
111 if (Settings().compositor_frame_message) | 111 if (Settings().compositor_frame_message) |
112 output_surface_->SendFrameToParentCompositor(&compositor_frame_); | 112 output_surface_->SendFrameToParentCompositor(&compositor_frame_); |
113 } | 113 } |
114 | 114 |
115 void SoftwareRenderer::ReceiveCompositorFrameAck( | 115 void SoftwareRenderer::ReceiveCompositorFrameAck( |
116 const CompositorFrameAck& ack) { | 116 const CompositorFrameAck& ack) { |
117 output_device_->ReclaimDIB(ack.last_dib_id); | 117 output_device_->ReclaimDIB(ack.last_dib_id); |
118 } | 118 } |
119 | 119 |
120 bool SoftwareRenderer::FlippedFramebuffer() const { | 120 bool SoftwareRenderer::FlippedFramebuffer() const { |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 4 * rect.width()); | 457 4 * rect.width()); |
458 } | 458 } |
459 | 459 |
460 void SoftwareRenderer::SetVisible(bool visible) { | 460 void SoftwareRenderer::SetVisible(bool visible) { |
461 if (visible_ == visible) | 461 if (visible_ == visible) |
462 return; | 462 return; |
463 visible_ = visible; | 463 visible_ = visible; |
464 } | 464 } |
465 | 465 |
466 } // namespace cc | 466 } // namespace cc |
OLD | NEW |