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/software_renderer.h" | 5 #include "cc/software_renderer.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/compositor_frame.h" | 8 #include "cc/compositor_frame.h" |
9 #include "cc/compositor_frame_ack.h" | 9 #include "cc/compositor_frame_ack.h" |
10 #include "cc/compositor_frame_metadata.h" | 10 #include "cc/compositor_frame_metadata.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 | 116 |
117 bool SoftwareRenderer::SwapBuffers() { | 117 bool SoftwareRenderer::SwapBuffers() { |
118 if (Settings().compositorFrameMessage) | 118 if (Settings().compositorFrameMessage) |
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 (client_->HasImplThread()) | |
126 client_->OnSwapBuffersComplete(); | |
127 output_device_->ReclaimDIB(ack.last_content_dib); | 125 output_device_->ReclaimDIB(ack.last_content_dib); |
128 } | 126 } |
129 | 127 |
130 bool SoftwareRenderer::FlippedFramebuffer() const { | 128 bool SoftwareRenderer::FlippedFramebuffer() const { |
131 return false; | 129 return false; |
132 } | 130 } |
133 | 131 |
134 void SoftwareRenderer::EnsureScissorTestEnabled() { | 132 void SoftwareRenderer::EnsureScissorTestEnabled() { |
135 is_scissor_enabled_ = true; | 133 is_scissor_enabled_ = true; |
136 SetClipRect(scissor_rect_); | 134 SetClipRect(scissor_rect_); |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 4 * rect.width()); | 407 4 * rect.width()); |
410 } | 408 } |
411 | 409 |
412 void SoftwareRenderer::SetVisible(bool visible) { | 410 void SoftwareRenderer::SetVisible(bool visible) { |
413 if (visible_ == visible) | 411 if (visible_ == visible) |
414 return; | 412 return; |
415 visible_ = visible; | 413 visible_ = visible; |
416 } | 414 } |
417 | 415 |
418 } // namespace cc | 416 } // namespace cc |
OLD | NEW |