Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.cc |
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
| index 344eb45d30a9fc8c238c528fb221c88687111196..347f337967b06cbfed370a782c6e10ac0be2cddb 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -36,6 +36,7 @@ |
| #include "cc/input/scroll_elasticity_helper.h" |
| #include "cc/input/scroll_state.h" |
| #include "cc/input/scrollbar_animation_controller.h" |
| +#include "cc/input/scroller_size.h" |
| #include "cc/layers/append_quads_data.h" |
| #include "cc/layers/effect_tree_layer_list_iterator.h" |
| #include "cc/layers/heads_up_display_layer_impl.h" |
| @@ -2795,6 +2796,20 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBegin( |
| scrolling_node = |
| scrolling_layer ? scroll_tree.Node(scrolling_layer->scroll_tree_index()) |
| : nullptr; |
| + if (!scroll_on_main_thread && scrolling_node && |
| + !viewport()->MainScrollLayer()) { |
|
bokan
2017/04/18 19:24:38
It'd be safer to check that the node is neither th
yigu
2017/04/19 20:53:05
Done.
|
| + if (IsWheelBasedScroll(type)) { |
| + UMA_HISTOGRAM_CUSTOM_COUNTS( |
| + "Event.Scroll.ScrollerSize.OnScroll_Wheel", |
| + scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, |
| + kMaxScrollerSize, kBucketNum); |
| + } else { |
| + UMA_HISTOGRAM_CUSTOM_COUNTS( |
| + "Event.Scroll.ScrollerSize.OnScroll_Touch", |
| + scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, |
| + kMaxScrollerSize, kBucketNum); |
| + } |
| + } |
| } |
| if (scroll_on_main_thread) { |