| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 // Prevents notifying the |client_| when an impl side invalidation request is | 320 // Prevents notifying the |client_| when an impl side invalidation request is |
| 321 // made. When unblocked, the disabled request will immediately be called. | 321 // made. When unblocked, the disabled request will immediately be called. |
| 322 virtual void BlockImplSideInvalidationRequestsForTesting(bool block); | 322 virtual void BlockImplSideInvalidationRequestsForTesting(bool block); |
| 323 | 323 |
| 324 // Resets all of the trees to an empty state. | 324 // Resets all of the trees to an empty state. |
| 325 void ResetTreesForTesting(); | 325 void ResetTreesForTesting(); |
| 326 | 326 |
| 327 size_t SourceAnimationFrameNumberForTesting() const; | 327 size_t SourceAnimationFrameNumberForTesting() const; |
| 328 | 328 |
| 329 void RegisterScrollbarAnimationController(ElementId scroll_element_id); | 329 void RegisterScrollbarAnimationController(ElementId scroll_element_id, |
| 330 float initial_opacity); |
| 330 void UnregisterScrollbarAnimationController(ElementId scroll_element_id); | 331 void UnregisterScrollbarAnimationController(ElementId scroll_element_id); |
| 331 ScrollbarAnimationController* ScrollbarAnimationControllerForElementId( | 332 ScrollbarAnimationController* ScrollbarAnimationControllerForElementId( |
| 332 ElementId scroll_element_id) const; | 333 ElementId scroll_element_id) const; |
| 333 | 334 |
| 334 DrawMode GetDrawMode() const; | 335 DrawMode GetDrawMode() const; |
| 335 | 336 |
| 336 // TileManagerClient implementation. | 337 // TileManagerClient implementation. |
| 337 void NotifyReadyToActivate() override; | 338 void NotifyReadyToActivate() override; |
| 338 void NotifyReadyToDraw() override; | 339 void NotifyReadyToDraw() override; |
| 339 void NotifyAllTileTasksCompleted() override; | 340 void NotifyAllTileTasksCompleted() override; |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 // compositor side. The information gets shared by the main thread as part of | 705 // compositor side. The information gets shared by the main thread as part of |
| 705 // the begin_main_frame_state. Finally Use counters are updated in the main | 706 // the begin_main_frame_state. Finally Use counters are updated in the main |
| 706 // thread side to keep track of the frequency of scrolling with different | 707 // thread side to keep track of the frequency of scrolling with different |
| 707 // sources per page load. TODO(crbug.com/691886): Use GRC API to plumb the | 708 // sources per page load. TODO(crbug.com/691886): Use GRC API to plumb the |
| 708 // scroll source info for Use Counters. | 709 // scroll source info for Use Counters. |
| 709 void UpdateScrollSourceInfo(bool is_wheel_scroll); | 710 void UpdateScrollSourceInfo(bool is_wheel_scroll); |
| 710 | 711 |
| 711 bool IsScrolledBy(LayerImpl* child, ScrollNode* ancestor); | 712 bool IsScrolledBy(LayerImpl* child, ScrollNode* ancestor); |
| 712 void ShowScrollbarsForImplScroll(ElementId element_id); | 713 void ShowScrollbarsForImplScroll(ElementId element_id); |
| 713 | 714 |
| 715 // Copy any opacity values already in the active tree to the pending |
| 716 // tree, because the active tree value always takes precedence for scrollbars. |
| 717 void PushScrollbarOpacitiesFromActiveToPending(); |
| 718 |
| 714 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>; | 719 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>; |
| 715 UIResourceMap ui_resource_map_; | 720 UIResourceMap ui_resource_map_; |
| 716 | 721 |
| 717 // Resources that were evicted by EvictAllUIResources. Resources are removed | 722 // Resources that were evicted by EvictAllUIResources. Resources are removed |
| 718 // from this when they are touched by a create or destroy from the UI resource | 723 // from this when they are touched by a create or destroy from the UI resource |
| 719 // request queue. | 724 // request queue. |
| 720 std::set<UIResourceId> evicted_ui_resources_; | 725 std::set<UIResourceId> evicted_ui_resources_; |
| 721 | 726 |
| 722 CompositorFrameSink* compositor_frame_sink_; | 727 CompositorFrameSink* compositor_frame_sink_; |
| 723 | 728 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 bool touchpad_and_wheel_scroll_latching_enabled_; | 877 bool touchpad_and_wheel_scroll_latching_enabled_; |
| 873 | 878 |
| 874 ImplThreadPhase impl_thread_phase_; | 879 ImplThreadPhase impl_thread_phase_; |
| 875 | 880 |
| 876 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 881 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 877 }; | 882 }; |
| 878 | 883 |
| 879 } // namespace cc | 884 } // namespace cc |
| 880 | 885 |
| 881 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 886 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |