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

Unified Diff: content/browser/renderer_host/input/touch_event_queue.cc

Issue 19670007: Send input event's LatencyInfo back from renderer to browser when acked (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase & remove CrackMessage() Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index 0a7b1d4fd9e713f5e52d9fae6d5befe2f9bffe8f..84237cee2bb591226e1a7473e983eef7ca49ff36 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -65,6 +65,10 @@ class CoalescedWebTouchEvent {
return false;
}
+ void SetLatencyInfoForCoalescedEvent(const ui::LatencyInfo& latency_info) {
+ coalesced_event_.latency = latency_info;
+ }
+
const TouchEventWithLatencyInfo& coalesced_event() const {
return coalesced_event_;
}
@@ -124,11 +128,14 @@ void TouchEventQueue::QueueEvent(const TouchEventWithLatencyInfo& event) {
touch_queue_.push_back(new CoalescedWebTouchEvent(event));
}
-void TouchEventQueue::ProcessTouchAck(InputEventAckState ack_result) {
+void TouchEventQueue::ProcessTouchAck(InputEventAckState ack_result,
+ const ui::LatencyInfo& latency_info) {
DCHECK(!dispatching_touch_ack_);
if (touch_queue_.empty())
return;
+ touch_queue_.front()->SetLatencyInfoForCoalescedEvent(latency_info);
sadrul 2013/08/06 19:08:27 Instead of doing this, can you send |latency_info|
Yufeng Shen (Slow to review) 2013/08/06 19:36:14 Done.
+
// Update the ACK status for each touch point in the ACKed event.
const WebKit::WebTouchEvent& event =
touch_queue_.front()->coalesced_event().event;
@@ -192,6 +199,7 @@ void TouchEventQueue::PopTouchEventWithAck(InputEventAckState ack_result) {
end = acked_event->end();
iter != end; ++iter) {
ui::LatencyInfo* latency = const_cast<ui::LatencyInfo*>(&(iter->latency));
+ latency->AddNewLatencyFrom(acked_event->coalesced_event().latency);
latency->AddLatencyNumber(
ui::INPUT_EVENT_LATENCY_ACKED_COMPONENT, 0, 0);
client_->OnTouchEventAck((*iter), ack_result);
« no previous file with comments | « content/browser/renderer_host/input/touch_event_queue.h ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698