| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 276 |
| 277 size_t GetAndResetAckCount() { return ack_handler_->GetAndResetAckCount(); } | 277 size_t GetAndResetAckCount() { return ack_handler_->GetAndResetAckCount(); } |
| 278 | 278 |
| 279 size_t AckCount() const { return ack_handler_->ack_count(); } | 279 size_t AckCount() const { return ack_handler_->ack_count(); } |
| 280 | 280 |
| 281 int64_t NextLatencyID() { return ++last_input_id_; } | 281 int64_t NextLatencyID() { return ++last_input_id_; } |
| 282 | 282 |
| 283 ui::LatencyInfo CreateLatencyInfo() { | 283 ui::LatencyInfo CreateLatencyInfo() { |
| 284 ui::LatencyInfo latency; | 284 ui::LatencyInfo latency; |
| 285 latency.AddLatencyNumber( | 285 latency.AddLatencyNumber( |
| 286 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, 1, 0); | 286 ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, 0); |
| 287 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1, | 287 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 288 NextLatencyID()); | 288 NextLatencyID()); |
| 289 return latency; | 289 return latency; |
| 290 } | 290 } |
| 291 | 291 |
| 292 template <typename EventType> | 292 template <typename EventType> |
| 293 void SimulateEventSequence(const char* test_name, | 293 void SimulateEventSequence(const char* test_name, |
| 294 const std::vector<EventType>& events, | 294 const std::vector<EventType>& events, |
| 295 bool ack_delay, | 295 bool ack_delay, |
| 296 size_t iterations) { | 296 size_t iterations) { |
| 297 OnHasTouchEventHandlers(true); | 297 OnHasTouchEventHandlers(true); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { | 399 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { |
| 400 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", | 400 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", |
| 401 kDefaultSteps, | 401 kDefaultSteps, |
| 402 kDefaultOrigin, | 402 kDefaultOrigin, |
| 403 kDefaultDistance, | 403 kDefaultDistance, |
| 404 kDefaultIterations); | 404 kDefaultIterations); |
| 405 } | 405 } |
| 406 | 406 |
| 407 } // namespace content | 407 } // namespace content |
| OLD | NEW |