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 "content/renderer/input/input_handler_proxy.h" | 5 #include "content/renderer/input/input_handler_proxy.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 InputHandlerProxy::EventDisposition | 212 InputHandlerProxy::EventDisposition |
213 InputHandlerProxy::HandleInputEventWithLatencyInfo( | 213 InputHandlerProxy::HandleInputEventWithLatencyInfo( |
214 const WebInputEvent& event, | 214 const WebInputEvent& event, |
215 ui::LatencyInfo* latency_info) { | 215 ui::LatencyInfo* latency_info) { |
216 DCHECK(input_handler_); | 216 DCHECK(input_handler_); |
217 | 217 |
218 if (uma_latency_reporting_enabled_) | 218 if (uma_latency_reporting_enabled_) |
219 ReportInputEventLatencyUma(event, *latency_info); | 219 ReportInputEventLatencyUma(event, *latency_info); |
220 | 220 |
| 221 TRACE_EVENT_WITH_FLOW0("toplevel", "InputHandlerProxy::HandleInputEventWithLat
encyInfo", |
| 222 TRACE_ID_DONT_MANGLE(latency_info->trace_id), |
| 223 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT); |
221 TRACE_EVENT_FLOW_STEP0("input,benchmark", | 224 TRACE_EVENT_FLOW_STEP0("input,benchmark", |
222 "LatencyInfo.Flow", | 225 "LatencyInfo.Flow", |
223 TRACE_ID_DONT_MANGLE(latency_info->trace_id), | 226 TRACE_ID_DONT_MANGLE(latency_info->trace_id), |
224 "HandleInputEventImpl"); | 227 "HandleInputEventImpl"); |
225 | 228 |
226 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor = | 229 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor = |
227 input_handler_->CreateLatencyInfoSwapPromiseMonitor(latency_info); | 230 input_handler_->CreateLatencyInfoSwapPromiseMonitor(latency_info); |
228 InputHandlerProxy::EventDisposition disposition = HandleInputEvent(event); | 231 InputHandlerProxy::EventDisposition disposition = HandleInputEvent(event); |
229 return disposition; | 232 return disposition; |
230 } | 233 } |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 // trigger a scroll, e.g., with a trivial time delta between fling updates. | 970 // trigger a scroll, e.g., with a trivial time delta between fling updates. |
968 // Return true in this case to prevent early fling termination. | 971 // Return true in this case to prevent early fling termination. |
969 if (std::abs(clipped_increment.width) < kScrollEpsilon && | 972 if (std::abs(clipped_increment.width) < kScrollEpsilon && |
970 std::abs(clipped_increment.height) < kScrollEpsilon) | 973 std::abs(clipped_increment.height) < kScrollEpsilon) |
971 return true; | 974 return true; |
972 | 975 |
973 return did_scroll; | 976 return did_scroll; |
974 } | 977 } |
975 | 978 |
976 } // namespace content | 979 } // namespace content |
OLD | NEW |