Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Side by Side Diff: content/renderer/input/input_handler_proxy.cc

Issue 400533006: Revert "Implement scroll handler latency tracking" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 InputHandlerProxy::EventDisposition 173 InputHandlerProxy::EventDisposition
174 InputHandlerProxy::HandleInputEventWithLatencyInfo( 174 InputHandlerProxy::HandleInputEventWithLatencyInfo(
175 const WebInputEvent& event, 175 const WebInputEvent& event,
176 ui::LatencyInfo* latency_info) { 176 ui::LatencyInfo* latency_info) {
177 DCHECK(input_handler_); 177 DCHECK(input_handler_);
178 178
179 SendScrollLatencyUma(event, *latency_info); 179 SendScrollLatencyUma(event, *latency_info);
180 180
181 TRACE_EVENT_FLOW_STEP0("input", 181 TRACE_EVENT_FLOW_STEP0(
182 "LatencyInfo.Flow", 182 "input",
183 TRACE_ID_DONT_MANGLE(latency_info->trace_id), 183 "LatencyInfo.Flow",
184 "HandleInputEventImpl"); 184 TRACE_ID_DONT_MANGLE(latency_info->trace_id),
185 "HanldeInputEventImpl");
185 186
186 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor = 187 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor =
187 input_handler_->CreateLatencyInfoSwapPromiseMonitor(latency_info); 188 input_handler_->CreateLatencyInfoSwapPromiseMonitor(latency_info);
188 InputHandlerProxy::EventDisposition disposition = HandleInputEvent(event); 189 InputHandlerProxy::EventDisposition disposition = HandleInputEvent(event);
189 return disposition; 190 return disposition;
190 } 191 }
191 192
192 InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent( 193 InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent(
193 const WebInputEvent& event) { 194 const WebInputEvent& event) {
194 DCHECK(input_handler_); 195 DCHECK(input_handler_);
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 // trigger a scroll, e.g., with a trivial time delta between fling updates. 803 // trigger a scroll, e.g., with a trivial time delta between fling updates.
803 // Return true in this case to prevent early fling termination. 804 // Return true in this case to prevent early fling termination.
804 if (std::abs(clipped_increment.width) < kScrollEpsilon && 805 if (std::abs(clipped_increment.width) < kScrollEpsilon &&
805 std::abs(clipped_increment.height) < kScrollEpsilon) 806 std::abs(clipped_increment.height) < kScrollEpsilon)
806 return true; 807 return true;
807 808
808 return did_scroll; 809 return did_scroll;
809 } 810 }
810 811
811 } // namespace content 812 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698