Index: content/renderer/input/main_thread_event_queue.h |
diff --git a/content/renderer/input/main_thread_event_queue.h b/content/renderer/input/main_thread_event_queue.h |
index 6a99636a9a0d2f0851d7404b89778eb676a733a8..4a36b1551df81f65f9be49ab8f5a30566f14e644 100644 |
--- a/content/renderer/input/main_thread_event_queue.h |
+++ b/content/renderer/input/main_thread_event_queue.h |
@@ -25,6 +25,7 @@ class EventWithDispatchType : public BaseClass { |
: BaseClass(e, l), type(t) {} |
InputEventDispatchType type; |
+ std::deque<uint32_t> eventsToAck; |
tdresser
2016/06/28 14:04:49
touchEventIdsToAck?
For wheel, we just need a cou
dtapuska
2016/06/28 17:30:21
I've changed it to be a dcheck for wheel events.
|
bool CanCoalesceWith(const EventWithDispatchType& other) const |
WARN_UNUSED_RESULT { |
@@ -32,6 +33,12 @@ class EventWithDispatchType : public BaseClass { |
} |
void CoalesceWith(const EventWithDispatchType& other) { |
+ // If we are blocking; and are coalescing touch; make sure to keep |
tdresser
2016/06/28 14:04:49
Nit: I think these ; are being used incorrectly -
dtapuska
2016/06/28 17:30:21
Done.
|
+ // the touch ids that need to be acked. |
+ if (type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { |
+ eventsToAck.push_back( |
+ WebInputEventTraits::GetUniqueTouchEventId(other.event)); |
tdresser
2016/06/28 14:04:49
We're going to end up pushing a bunch of zero's in
dtapuska
2016/06/28 17:30:21
It shouldn't really happen.
|
+ } |
BaseClass::CoalesceWith(other); |
} |
}; |
@@ -52,6 +59,11 @@ class CONTENT_EXPORT MainThreadEventQueueClient { |
const blink::WebInputEvent* event, |
const ui::LatencyInfo& latency, |
InputEventDispatchType dispatch_type) = 0; |
+ |
+ virtual void SendInputEventAck(int routing_id, |
+ blink::WebInputEvent::Type type, |
+ InputEventAckState ack_result, |
+ uint32_t touch_event_id) = 0; |
}; |
// MainThreadEventQueue implements a series of queues (one touch |
@@ -104,7 +116,8 @@ class CONTENT_EXPORT MainThreadEventQueue { |
// Call once the main thread has handled an outstanding |type| event |
// in flight. |
- void EventHandled(blink::WebInputEvent::Type type); |
+ void EventHandled(blink::WebInputEvent::Type type, |
+ InputEventAckState ack_result); |
void set_is_flinging(bool is_flinging) { is_flinging_ = is_flinging; } |
@@ -116,6 +129,11 @@ class CONTENT_EXPORT MainThreadEventQueue { |
WebInputEventQueue<PendingTouchEvent> touch_events_; |
bool is_flinging_; |
+ // TODO(dtapuska): These can be removed when the queues are dequeued |
tdresser
2016/06/28 14:04:49
Can we link to a bug here?
dtapuska
2016/06/28 17:30:21
Done.
|
+ // on the main thread. |
+ std::unique_ptr<PendingMouseWheelEvent> in_flight_wheel_event_; |
+ std::unique_ptr<PendingTouchEvent> in_flight_touch_event_; |
+ |
DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); |
}; |