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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 pending_page_scale_animation_.reset( | 836 pending_page_scale_animation_.reset( |
837 new PendingPageScaleAnimation( | 837 new PendingPageScaleAnimation( |
838 target_offset, | 838 target_offset, |
839 use_anchor, | 839 use_anchor, |
840 scale, | 840 scale, |
841 duration)); | 841 duration)); |
842 | 842 |
843 SetNeedsCommit(); | 843 SetNeedsCommit(); |
844 } | 844 } |
845 | 845 |
| 846 bool LayerTreeHost::HasPendingPageScaleAnimation() const { |
| 847 return pending_page_scale_animation_.get(); |
| 848 } |
| 849 |
846 void LayerTreeHost::NotifyInputThrottledUntilCommit() { | 850 void LayerTreeHost::NotifyInputThrottledUntilCommit() { |
847 proxy_->NotifyInputThrottledUntilCommit(); | 851 proxy_->NotifyInputThrottledUntilCommit(); |
848 } | 852 } |
849 | 853 |
850 void LayerTreeHost::LayoutAndUpdateLayers() { | 854 void LayerTreeHost::LayoutAndUpdateLayers() { |
851 DCHECK(IsSingleThreaded()); | 855 DCHECK(IsSingleThreaded()); |
852 // This function is only valid when not using the scheduler. | 856 // This function is only valid when not using the scheduler. |
853 DCHECK(!settings_.single_thread_proxy_scheduler); | 857 DCHECK(!settings_.single_thread_proxy_scheduler); |
854 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); | 858 SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get()); |
855 | 859 |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 int seq_num = property_trees_.sequence_number; | 1655 int seq_num = property_trees_.sequence_number; |
1652 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { | 1656 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { |
1653 layer->set_property_tree_sequence_number(seq_num); | 1657 layer->set_property_tree_sequence_number(seq_num); |
1654 }); | 1658 }); |
1655 | 1659 |
1656 surface_id_namespace_ = proto.surface_id_namespace(); | 1660 surface_id_namespace_ = proto.surface_id_namespace(); |
1657 next_surface_sequence_ = proto.next_surface_sequence(); | 1661 next_surface_sequence_ = proto.next_surface_sequence(); |
1658 } | 1662 } |
1659 | 1663 |
1660 } // namespace cc | 1664 } // namespace cc |
OLD | NEW |