Index: content/browser/renderer_host/input/touch_event_queue.h |
diff --git a/content/browser/renderer_host/input/touch_event_queue.h b/content/browser/renderer_host/input/touch_event_queue.h |
index a61b90d8eca8c1707d31b3e9bfbadabb175047a0..a40dbb6d367f6baa825fa1f3178c379136b87095 100644 |
--- a/content/browser/renderer_host/input/touch_event_queue.h |
+++ b/content/browser/renderer_host/input/touch_event_queue.h |
@@ -66,6 +66,8 @@ class CONTENT_EXPORT TouchEventQueue { |
void ProcessTouchAck(InputEventAckState ack_result, |
const ui::LatencyInfo& latency_info); |
+ void ProcessUncancelableTouchMoveAck(); |
+ |
// When GestureScrollBegin is received, we send a touch cancel to renderer, |
// route all the following touch events directly to client, and ignore the |
// ack for the touch cancel. When Gesture{ScrollEnd,FlingStart} is received, |
@@ -102,6 +104,14 @@ class CONTENT_EXPORT TouchEventQueue { |
bool has_handlers() const { return has_handlers_; } |
+ int PendingUncancelableEventAckCount() const { |
+ return pending_uncancelable_event_ack_count_; |
+ } |
+ |
+ int SentUncancelableTouchMoveCount() const { |
+ return sent_uncancelable_touch_move_count_; |
+ } |
+ |
private: |
class TouchTimeoutHandler; |
class TouchMoveSlopSuppressor; |
@@ -202,6 +212,18 @@ class CONTENT_EXPORT TouchEventQueue { |
// For details see the design doc at http://goo.gl/lVyJAa. |
bool send_touch_events_async_; |
scoped_ptr<TouchEventWithLatencyInfo> pending_async_touchmove_; |
+ |
+ // Once this value is greater than 0, which means we should ignore the |
+ // following ignore_ack_ numbers of acks from render for async touch moves. |
+ int pending_uncancelable_event_ack_count_; |
+ |
+ // For uncancelable touch moves, not only we send a fake ack, but also a real |
+ // ack from render, which we use to decide when to send the next touch move. |
+ // This can help avoid the touch event queue keep growing when render handles |
+ // touchmove slow. We use sent_uncancelable_touch_move_count_ to count the |
+ // number of uncancelable touch moves sent out are waiting for |
+ // their acks back from render. |
+ int sent_uncancelable_touch_move_count_; |
tdresser
2015/03/25 14:16:18
I'm still not clear on why we need both pending_un
|
double last_sent_touch_timestamp_sec_; |
// Event is saved to compare pointer positions for new touchmove events. |