Chromium Code Reviews| 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 690 | 690 |
| 691 void ScrollAnimationAbort(LayerImpl* layer_impl); | 691 void ScrollAnimationAbort(LayerImpl* layer_impl); |
| 692 | 692 |
| 693 bool ScrollAnimationUpdateTarget(ScrollNode* scroll_node, | 693 bool ScrollAnimationUpdateTarget(ScrollNode* scroll_node, |
| 694 const gfx::Vector2dF& scroll_delta, | 694 const gfx::Vector2dF& scroll_delta, |
| 695 base::TimeDelta delayed_by); | 695 base::TimeDelta delayed_by); |
| 696 | 696 |
| 697 void SetCompositorContextVisibility(bool is_visible); | 697 void SetCompositorContextVisibility(bool is_visible); |
| 698 void SetWorkerContextVisibility(bool is_visible); | 698 void SetWorkerContextVisibility(bool is_visible); |
| 699 | 699 |
| 700 // Cache & restore variables that get reset in ClearCurrentlyScrollingLayer. | |
| 701 // This is used to restore the variables' values in a scrollBegin event | |
| 702 // that is in inertial phase (a fling) to lach the event to its corresponding | |
|
tdresser
2016/10/19 15:28:04
lach -> latch.
sahel
2016/10/25 15:34:14
Done.
| |
| 703 // scroll. | |
|
tdresser
2016/10/19 15:28:04
scroll -> scroller.
sahel
2016/10/25 15:34:14
Done.
| |
| 704 void CacheScrollingVariablesState(); | |
|
tdresser
2016/10/19 15:28:04
Can we come up with a more specific name than "Scr
sahel
2016/10/25 15:34:14
You are right, but I couldn't come up with a bette
bokan
2016/10/25 17:29:21
How about CacheScrollStateForFling (FlingContinuat
sahel
2016/10/26 14:11:43
Done.
| |
| 705 void RestoreCachedScrollingVariablesState(); | |
| 706 | |
| 700 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>; | 707 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>; |
| 701 UIResourceMap ui_resource_map_; | 708 UIResourceMap ui_resource_map_; |
| 702 | 709 |
| 703 // Resources that were evicted by EvictAllUIResources. Resources are removed | 710 // Resources that were evicted by EvictAllUIResources. Resources are removed |
| 704 // from this when they are touched by a create or destroy from the UI resource | 711 // from this when they are touched by a create or destroy from the UI resource |
| 705 // request queue. | 712 // request queue. |
| 706 std::set<UIResourceId> evicted_ui_resources_; | 713 std::set<UIResourceId> evicted_ui_resources_; |
| 707 | 714 |
| 708 CompositorFrameSink* compositor_frame_sink_; | 715 CompositorFrameSink* compositor_frame_sink_; |
| 709 | 716 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 735 | 742 |
| 736 // In impl-side painting mode, tree with possibly incomplete rasterized | 743 // In impl-side painting mode, tree with possibly incomplete rasterized |
| 737 // content. May be promoted to active by ActivatePendingTree(). | 744 // content. May be promoted to active by ActivatePendingTree(). |
| 738 std::unique_ptr<LayerTreeImpl> pending_tree_; | 745 std::unique_ptr<LayerTreeImpl> pending_tree_; |
| 739 | 746 |
| 740 // In impl-side painting mode, inert tree with layers that can be recycled | 747 // In impl-side painting mode, inert tree with layers that can be recycled |
| 741 // by the next sync from the main thread. | 748 // by the next sync from the main thread. |
| 742 std::unique_ptr<LayerTreeImpl> recycle_tree_; | 749 std::unique_ptr<LayerTreeImpl> recycle_tree_; |
| 743 | 750 |
| 744 InputHandlerClient* input_handler_client_; | 751 InputHandlerClient* input_handler_client_; |
| 745 bool did_lock_scrolling_layer_; | 752 bool did_lock_scrolling_layer_; |
|
tdresser
2016/10/19 15:28:04
Can we put these in the struct here as well?
sahel
2016/10/25 15:34:14
I am not sure if it's a good idea to do so, becaus
bokan
2016/10/25 17:29:21
Yah, wheel_scrolling_ is set in ScrollBeginImpl wh
| |
| 746 bool wheel_scrolling_; | 753 bool wheel_scrolling_; |
| 747 bool scroll_affects_scroll_handler_; | 754 bool scroll_affects_scroll_handler_; |
| 748 int scroll_layer_id_when_mouse_over_scrollbar_; | 755 int scroll_layer_id_when_mouse_over_scrollbar_; |
| 749 int captured_scrollbar_layer_id_; | 756 int captured_scrollbar_layer_id_; |
| 750 | 757 |
| 751 std::vector<std::unique_ptr<SwapPromise>> | 758 std::vector<std::unique_ptr<SwapPromise>> |
| 752 swap_promises_for_main_thread_scroll_update_; | 759 swap_promises_for_main_thread_scroll_update_; |
| 753 | 760 |
| 754 // An object to implement the ScrollElasticityHelper interface and | 761 // An object to implement the ScrollElasticityHelper interface and |
| 755 // hold all state related to elasticity. May be NULL if never requested. | 762 // hold all state related to elasticity. May be NULL if never requested. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 837 | 844 |
| 838 std::unique_ptr<PendingTreeDurationHistogramTimer> | 845 std::unique_ptr<PendingTreeDurationHistogramTimer> |
| 839 pending_tree_duration_timer_; | 846 pending_tree_duration_timer_; |
| 840 | 847 |
| 841 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 848 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 842 }; | 849 }; |
| 843 | 850 |
| 844 } // namespace cc | 851 } // namespace cc |
| 845 | 852 |
| 846 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 853 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |