OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layer_tree_host_impl.h" | 5 #include "cc/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 // We always need to commit after changing the memory policy because the new | 789 // We always need to commit after changing the memory policy because the new |
790 // limit can result in more or less content having texture allocated for it. | 790 // limit can result in more or less content having texture allocated for it. |
791 m_client->setNeedsCommitOnImplThread(); | 791 m_client->setNeedsCommitOnImplThread(); |
792 } | 792 } |
793 | 793 |
794 void LayerTreeHostImpl::OnVSyncParametersChanged(base::TimeTicks timebase, base:
:TimeDelta interval) | 794 void LayerTreeHostImpl::OnVSyncParametersChanged(base::TimeTicks timebase, base:
:TimeDelta interval) |
795 { | 795 { |
796 m_client->onVSyncParametersChanged(timebase, interval); | 796 m_client->onVSyncParametersChanged(timebase, interval); |
797 } | 797 } |
798 | 798 |
799 void LayerTreeHostImpl::OnSendFrameToParentCompositorAck(const CompositorFrameAc
k&) | 799 void LayerTreeHostImpl::OnSendFrameToParentCompositorAck(const CompositorFrameAc
k& ack) |
800 { | 800 { |
801 // TODO(danakj): Implement this. | 801 if (!m_renderer) |
| 802 return; |
| 803 |
| 804 // TODO(piman): We may need to do some validation on this ack before process
ing it. |
| 805 m_renderer->receiveCompositorFrameAck(ack); |
802 } | 806 } |
803 | 807 |
804 void LayerTreeHostImpl::OnCanDrawStateChangedForTree(LayerTreeImpl*) | 808 void LayerTreeHostImpl::OnCanDrawStateChangedForTree(LayerTreeImpl*) |
805 { | 809 { |
806 m_client->onCanDrawStateChanged(canDraw()); | 810 m_client->onCanDrawStateChanged(canDraw()); |
807 } | 811 } |
808 | 812 |
809 void LayerTreeHostImpl::drawLayers(FrameData& frame) | 813 void LayerTreeHostImpl::drawLayers(FrameData& frame) |
810 { | 814 { |
811 TRACE_EVENT0("cc", "LayerTreeHostImpl::drawLayers"); | 815 TRACE_EVENT0("cc", "LayerTreeHostImpl::drawLayers"); |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1617 | 1621 |
1618 void LayerTreeHostImpl::UnregisterAnimationController(LayerAnimationController*
controller) { | 1622 void LayerTreeHostImpl::UnregisterAnimationController(LayerAnimationController*
controller) { |
1619 #if !defined(NDEBUG) | 1623 #if !defined(NDEBUG) |
1620 if (ContainsKey(m_allAnimationControllers, controller)) | 1624 if (ContainsKey(m_allAnimationControllers, controller)) |
1621 m_allAnimationControllers.erase(controller); | 1625 m_allAnimationControllers.erase(controller); |
1622 #endif | 1626 #endif |
1623 DidDeactivateAnimationController(controller); | 1627 DidDeactivateAnimationController(controller); |
1624 } | 1628 } |
1625 | 1629 |
1626 } // namespace cc | 1630 } // namespace cc |
OLD | NEW |