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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 bool SoftwareRenderer::swapBuffers() | 124 bool SoftwareRenderer::swapBuffers() |
125 { | 125 { |
126 if (settings().compositorFrameMessage) | 126 if (settings().compositorFrameMessage) |
127 m_outputSurface->SendFrameToParentCompositor(&m_compositorFrame); | 127 m_outputSurface->SendFrameToParentCompositor(&m_compositorFrame); |
128 return true; | 128 return true; |
129 } | 129 } |
130 | 130 |
131 void SoftwareRenderer::receiveCompositorFrameAck(const CompositorFrameAck& ack) | 131 void SoftwareRenderer::receiveCompositorFrameAck(const CompositorFrameAck& ack) |
132 { | 132 { |
| 133 m_outputDevice->ReclaimDIB(ack.last_content_dib); |
133 if (m_client->hasImplThread()) | 134 if (m_client->hasImplThread()) |
134 m_client->onSwapBuffersComplete(); | 135 m_client->onSwapBuffersComplete(); |
135 m_outputDevice->ReclaimDIB(ack.last_content_dib); | |
136 } | 136 } |
137 | 137 |
138 bool SoftwareRenderer::flippedFramebuffer() const | 138 bool SoftwareRenderer::flippedFramebuffer() const |
139 { | 139 { |
140 return false; | 140 return false; |
141 } | 141 } |
142 | 142 |
143 void SoftwareRenderer::ensureScissorTestEnabled() | 143 void SoftwareRenderer::ensureScissorTestEnabled() |
144 { | 144 { |
145 m_isScissorEnabled = true; | 145 m_isScissorEnabled = true; |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 } | 415 } |
416 | 416 |
417 void SoftwareRenderer::setVisible(bool visible) | 417 void SoftwareRenderer::setVisible(bool visible) |
418 { | 418 { |
419 if (m_visible == visible) | 419 if (m_visible == visible) |
420 return; | 420 return; |
421 m_visible = visible; | 421 m_visible = visible; |
422 } | 422 } |
423 | 423 |
424 } // namespace cc | 424 } // namespace cc |
OLD | NEW |