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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 120513005: [Android] Perform eager gesture recognition on MotionEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo some changes Created 6 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 if (!event.latency.FindLatency( 2084 if (!event.latency.FindLatency(
2085 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { 2085 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) {
2086 // GestureEvent latency ends when it is acked but does not cause any 2086 // GestureEvent latency ends when it is acked but does not cause any
2087 // rendering scheduled. 2087 // rendering scheduled.
2088 ui::LatencyInfo latency = event.latency; 2088 ui::LatencyInfo latency = event.latency;
2089 latency.AddLatencyNumber( 2089 latency.AddLatencyNumber(
2090 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0 ,0); 2090 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0 ,0);
2091 } 2091 }
2092 2092
2093 if (view_) 2093 if (view_)
2094 view_->GestureEventAck(event.event.type, ack_result); 2094 view_->GestureEventAck(event.event, ack_result);
2095 } 2095 }
2096 2096
2097 void RenderWidgetHostImpl::OnTouchEventAck( 2097 void RenderWidgetHostImpl::OnTouchEventAck(
2098 const TouchEventWithLatencyInfo& event, 2098 const TouchEventWithLatencyInfo& event,
2099 InputEventAckState ack_result) { 2099 InputEventAckState ack_result) {
2100 TouchEventWithLatencyInfo touch_event = event; 2100 TouchEventWithLatencyInfo touch_event = event;
2101 // TouchEvent latency does not end when acked since it could later on 2101 // TouchEvent latency does not end when acked since it could later on
2102 // become gesture events. 2102 // become gesture events.
2103 touch_event.latency.AddLatencyNumber( 2103 touch_event.latency.AddLatencyNumber(
2104 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 0, 0); 2104 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 0, 0);
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2569 } 2569 }
2570 } 2570 }
2571 2571
2572 // Add newly generated components into the latency info 2572 // Add newly generated components into the latency info
2573 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { 2573 for (lc = new_components.begin(); lc != new_components.end(); ++lc) {
2574 latency_info->latency_components[lc->first] = lc->second; 2574 latency_info->latency_components[lc->first] = lc->second;
2575 } 2575 }
2576 } 2576 }
2577 2577
2578 } // namespace content 2578 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698