| 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) { | 430 if (val == cc::MainThreadScrollingReason::kHandlingScrollFromMainThread) { |
| 431 // We only want to record "animating scroll on main thread" reason if | 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 | 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 | 433 // for scrolling on main is something else, and we only want to pay |
| 434 // attention to that reason. | 434 // attention to that reason. |
| 435 if (reasons & ~val) | 435 if (reasons & ~val) |
| 436 continue; | 436 continue; |
| 437 } | 437 } |
| 438 if (device == blink::WebGestureDeviceTouchscreen) { | 438 if (device == blink::WebGestureDeviceTouchscreen) { |
| 439 UMA_HISTOGRAM_ENUMERATION( | 439 UMA_HISTOGRAM_ENUMERATION( |
| 440 kGestureHistogramName, i + 1, | 440 kGestureHistogramName, i + 1, |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 // is made asynchronously, to minimize divergence between main thread and | 1337 // is made asynchronously, to minimize divergence between main thread and |
| 1338 // impl thread event handling paths. | 1338 // impl thread event handling paths. |
| 1339 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1339 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 1340 FROM_HERE, | 1340 FROM_HERE, |
| 1341 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, | 1341 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, |
| 1342 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1342 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
| 1343 scroll_result)); | 1343 scroll_result)); |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 } // namespace ui | 1346 } // namespace ui |
| OLD | NEW |