OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ui/events/blink/input_handler_proxy.h" | 5 #include "ui/events/blink/input_handler_proxy.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 cc::MainThreadScrollingReason::kNotScrollingOnMain, | 420 cc::MainThreadScrollingReason::kNotScrollingOnMain, |
421 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount); | 421 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount); |
422 } | 422 } |
423 } | 423 } |
424 | 424 |
425 for (uint32_t i = 0; | 425 for (uint32_t i = 0; |
426 i < cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount - 1; | 426 i < cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount - 1; |
427 ++i) { | 427 ++i) { |
428 unsigned val = 1 << i; | 428 unsigned val = 1 << i; |
429 if (reasons & val) { | 429 if (reasons & val) { |
| 430 if (val == cc::MainThreadScrollingReason::kAnimatingScrollOnMainThread) { |
| 431 // We only want to record "animating scroll on main thread" reason if |
| 432 // it's the only reason. If it's not the only reason, the "real" reason |
| 433 // for scrolling on main is something else, and we only want to pay |
| 434 // attention to that reason. |
| 435 if (reasons & ~val) |
| 436 continue; |
| 437 } |
430 if (device == blink::WebGestureDeviceTouchscreen) { | 438 if (device == blink::WebGestureDeviceTouchscreen) { |
431 UMA_HISTOGRAM_ENUMERATION( | 439 UMA_HISTOGRAM_ENUMERATION( |
432 kGestureHistogramName, i + 1, | 440 kGestureHistogramName, i + 1, |
433 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount); | 441 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount); |
434 } else { | 442 } else { |
435 UMA_HISTOGRAM_ENUMERATION( | 443 UMA_HISTOGRAM_ENUMERATION( |
436 kWheelHistogramName, i + 1, | 444 kWheelHistogramName, i + 1, |
437 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount); | 445 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount); |
438 } | 446 } |
439 } | 447 } |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 // is made asynchronously, to minimize divergence between main thread and | 1337 // is made asynchronously, to minimize divergence between main thread and |
1330 // impl thread event handling paths. | 1338 // impl thread event handling paths. |
1331 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1339 base::ThreadTaskRunnerHandle::Get()->PostTask( |
1332 FROM_HERE, | 1340 FROM_HERE, |
1333 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, | 1341 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, |
1334 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1342 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
1335 scroll_result)); | 1343 scroll_result)); |
1336 } | 1344 } |
1337 | 1345 |
1338 } // namespace ui | 1346 } // namespace ui |
OLD | NEW |