Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: TODO for GRC usage added. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 void UpdateRootLayerStateForSynchronousInputHandler(); 700 void UpdateRootLayerStateForSynchronousInputHandler();
701 701
702 bool ScrollAnimationUpdateTarget(ScrollNode* scroll_node, 702 bool ScrollAnimationUpdateTarget(ScrollNode* scroll_node,
703 const gfx::Vector2dF& scroll_delta, 703 const gfx::Vector2dF& scroll_delta,
704 base::TimeDelta delayed_by); 704 base::TimeDelta delayed_by);
705 705
706 void SetContextVisibility(bool is_visible); 706 void SetContextVisibility(bool is_visible);
707 void ImageDecodeFinished(const base::Callback<void(bool)>& embedder_callback, 707 void ImageDecodeFinished(const base::Callback<void(bool)>& embedder_callback,
708 bool decode_succeeded); 708 bool decode_succeeded);
709 709
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
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
714 // sources per page load. TODO(crbug.com/691886): Use GRC API to plumb the
715 // scroll source info for Use Counters.
716 void UpdateScrollSourceInfo(bool is_wheel_scroll);
717
710 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>; 718 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>;
711 UIResourceMap ui_resource_map_; 719 UIResourceMap ui_resource_map_;
712 720
713 // Resources that were evicted by EvictAllUIResources. Resources are removed 721 // Resources that were evicted by EvictAllUIResources. Resources are removed
714 // from this when they are touched by a create or destroy from the UI resource 722 // from this when they are touched by a create or destroy from the UI resource
715 // request queue. 723 // request queue.
716 std::set<UIResourceId> evicted_ui_resources_; 724 std::set<UIResourceId> evicted_ui_resources_;
717 725
718 CompositorFrameSink* compositor_frame_sink_; 726 CompositorFrameSink* compositor_frame_sink_;
719 727
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 854
847 std::unique_ptr<LayerTreeMutator> mutator_; 855 std::unique_ptr<LayerTreeMutator> mutator_;
848 856
849 std::unique_ptr<PendingTreeDurationHistogramTimer> 857 std::unique_ptr<PendingTreeDurationHistogramTimer>
850 pending_tree_duration_timer_; 858 pending_tree_duration_timer_;
851 859
852 // These callbacks are stored here to be transfered to the main thread when we 860 // These callbacks are stored here to be transfered to the main thread when we
853 // begin main frame. These callbacks must only be called on the main thread. 861 // begin main frame. These callbacks must only be called on the main thread.
854 std::vector<base::Closure> completed_image_decode_callbacks_; 862 std::vector<base::Closure> completed_image_decode_callbacks_;
855 863
864 // These are used to transfer usage of touch and wheel scrolls to the main
865 // thread.
866 bool has_scrolled_by_wheel_;
867 bool has_scrolled_by_touch_;
868
856 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 869 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
857 }; 870 };
858 871
859 } // namespace cc 872 } // namespace cc
860 873
861 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 874 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698