| 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 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <bitset> | 10 #include <bitset> |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 bool decode_succeeded); | 708 bool decode_succeeded); |
| 709 | 709 |
| 710 // This function keeps track of sources of scrolls that are handled in the | 710 // This function keeps track of sources of scrolls that are handled in the |
| 711 // compositor side. The information gets shared by the main thread as part of | 711 // compositor side. The information gets shared by the main thread as part of |
| 712 // the begin_main_frame_state. Finally Use counters are updated in the main | 712 // the begin_main_frame_state. Finally Use counters are updated in the main |
| 713 // thread side to keep track of the frequency of scrolling with different | 713 // thread side to keep track of the frequency of scrolling with different |
| 714 // sources per page load. TODO(crbug.com/691886): Use GRC API to plumb the | 714 // sources per page load. TODO(crbug.com/691886): Use GRC API to plumb the |
| 715 // scroll source info for Use Counters. | 715 // scroll source info for Use Counters. |
| 716 void UpdateScrollSourceInfo(bool is_wheel_scroll); | 716 void UpdateScrollSourceInfo(bool is_wheel_scroll); |
| 717 | 717 |
| 718 bool IsScrolledBy(LayerImpl* child, ScrollNode* ancestor); |
| 719 |
| 718 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>; | 720 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>; |
| 719 UIResourceMap ui_resource_map_; | 721 UIResourceMap ui_resource_map_; |
| 720 | 722 |
| 721 // Resources that were evicted by EvictAllUIResources. Resources are removed | 723 // Resources that were evicted by EvictAllUIResources. Resources are removed |
| 722 // from this when they are touched by a create or destroy from the UI resource | 724 // from this when they are touched by a create or destroy from the UI resource |
| 723 // request queue. | 725 // request queue. |
| 724 std::set<UIResourceId> evicted_ui_resources_; | 726 std::set<UIResourceId> evicted_ui_resources_; |
| 725 | 727 |
| 726 CompositorFrameSink* compositor_frame_sink_; | 728 CompositorFrameSink* compositor_frame_sink_; |
| 727 | 729 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 // thread. | 867 // thread. |
| 866 bool has_scrolled_by_wheel_; | 868 bool has_scrolled_by_wheel_; |
| 867 bool has_scrolled_by_touch_; | 869 bool has_scrolled_by_touch_; |
| 868 | 870 |
| 869 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 871 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 870 }; | 872 }; |
| 871 | 873 |
| 872 } // namespace cc | 874 } // namespace cc |
| 873 | 875 |
| 874 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 876 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |