Chromium Code Reviews| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 current_canvas_ = NULL; | 110 current_canvas_ = NULL; |
| 111 root_canvas_ = NULL; | 111 root_canvas_ = NULL; |
| 112 if (Settings().compositor_frame_message) { | 112 if (Settings().compositor_frame_message) { |
| 113 compositor_frame_.metadata = client_->MakeCompositorFrameMetadata(); | 113 compositor_frame_.metadata = client_->MakeCompositorFrameMetadata(); |
| 114 output_device_->EndPaint(compositor_frame_.software_frame_data.get()); | 114 output_device_->EndPaint(compositor_frame_.software_frame_data.get()); |
| 115 } else { | 115 } else { |
| 116 output_device_->EndPaint(NULL); | 116 output_device_->EndPaint(NULL); |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 | 119 |
| 120 bool SoftwareRenderer::SwapBuffers() { | 120 bool SoftwareRenderer::SwapBuffers(const cc::LatencyInfo&) { |
|
jamesr
2013/04/19 01:25:38
no cc:: needed, you're inside the namespace
| |
| 121 if (Settings().compositor_frame_message) | 121 if (Settings().compositor_frame_message) |
| 122 output_surface_->SendFrameToParentCompositor(&compositor_frame_); | 122 output_surface_->SendFrameToParentCompositor(&compositor_frame_); |
| 123 return true; | 123 return true; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void SoftwareRenderer::ReceiveCompositorFrameAck( | 126 void SoftwareRenderer::ReceiveCompositorFrameAck( |
| 127 const CompositorFrameAck& ack) { | 127 const CompositorFrameAck& ack) { |
| 128 output_device_->ReclaimDIB(ack.last_dib_id); | 128 output_device_->ReclaimDIB(ack.last_dib_id); |
| 129 } | 129 } |
| 130 | 130 |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 4 * rect.width()); | 416 4 * rect.width()); |
| 417 } | 417 } |
| 418 | 418 |
| 419 void SoftwareRenderer::SetVisible(bool visible) { | 419 void SoftwareRenderer::SetVisible(bool visible) { |
| 420 if (visible_ == visible) | 420 if (visible_ == visible) |
| 421 return; | 421 return; |
| 422 visible_ = visible; | 422 visible_ = visible; |
| 423 } | 423 } |
| 424 | 424 |
| 425 } // namespace cc | 425 } // namespace cc |
| OLD | NEW |