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

Unified Diff: ui/events/gestures/gesture_provider_aura.cc

Issue 309823002: Pass ui::LatencyInfo correct with unified gesture detector on Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable unified GR. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/gestures/gesture_provider_aura.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/gesture_provider_aura.cc
diff --git a/ui/events/gestures/gesture_provider_aura.cc b/ui/events/gestures/gesture_provider_aura.cc
index 0db2e04f882d52dd017c8e31a33d5a6638eabea7..43aaf8ad5d4dad580602034435586d4ac2974cd1 100644
--- a/ui/events/gestures/gesture_provider_aura.cc
+++ b/ui/events/gestures/gesture_provider_aura.cc
@@ -22,6 +22,7 @@ GestureProviderAura::~GestureProviderAura() {}
bool GestureProviderAura::OnTouchEvent(const TouchEvent& event) {
last_touch_event_flags_ = event.flags();
jdduke (slow) 2014/06/02 17:27:24 Hmm, should we move these |last_foo_ = event.foo()
tdresser 2014/06/02 17:33:23 Done.
+ last_touch_event_latency_info_ = *event.latency();
bool pointer_id_is_active = false;
for (size_t i = 0; i < pointer_state_.GetPointerCount(); ++i) {
if (event.touch_id() != pointer_state_.GetPointerId(i))
@@ -80,6 +81,18 @@ void GestureProviderAura::OnGestureEvent(
// used when one finger is down, and will eventually
// be cleaned up. See crbug.com/366707.
1 << gesture.motion_event_id);
+
+ ui::LatencyInfo* gesture_latency = event.latency();
+ gesture_latency->CopyLatencyFrom(
+ last_touch_event_latency_info_,
+ ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT);
+ gesture_latency->CopyLatencyFrom(
+ last_touch_event_latency_info_,
+ ui::INPUT_EVENT_LATENCY_UI_COMPONENT);
+ gesture_latency->CopyLatencyFrom(
+ last_touch_event_latency_info_,
+ ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT);
+
client_->OnGestureEvent(&event);
}
« no previous file with comments | « ui/events/gestures/gesture_provider_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698