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

Unified Diff: content/renderer/input/main_thread_event_queue.h

Issue 2713093005: Teach MainThreadEventQueue about touchmove throttling. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
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 7f2f62a6bdcf40f9f9de8338f42e7e09e62fd1bb..ee39856be4b00413a010ee33cccac4d307634f93 100644
--- a/content/renderer/input/main_thread_event_queue.h
+++ b/content/renderer/input/main_thread_event_queue.h
@@ -24,7 +24,8 @@ class EventWithDispatchType : public ScopedWebInputEventWithLatencyInfo {
public:
EventWithDispatchType(ui::WebScopedInputEvent event,
const ui::LatencyInfo& latency,
- InputEventDispatchType dispatch_type);
+ InputEventDispatchType dispatch_type,
+ bool originally_cancelable);
~EventWithDispatchType();
void CoalesceWith(const EventWithDispatchType& other);
@@ -41,6 +42,8 @@ class EventWithDispatchType : public ScopedWebInputEventWithLatencyInfo {
return non_blocking_coalesced_count_ + blocking_coalesced_event_ids_.size();
}
+ bool originallyCancelable() const { return originally_cancelable_; }
dtapuska 2017/02/24 19:18:48 Happy for another name. It's friday and I didn't h
aelias_OOO_until_Jul13 2017/02/24 20:19:51 It doesn't seem that the additional state adds any
dtapuska 2017/02/24 20:23:35 Not true. dispatch_type_ is whether an ACK needs t
aelias_OOO_until_Jul13 2017/02/24 21:01:14 OK. If I understand correctly, this is a problem
dtapuska 2017/02/24 21:29:41 These dispatch_types_ are of different enums. We r
+
private:
InputEventDispatchType dispatch_type_;
@@ -53,6 +56,12 @@ class EventWithDispatchType : public ScopedWebInputEventWithLatencyInfo {
size_t non_blocking_coalesced_count_;
base::TimeTicks creation_timestamp_;
base::TimeTicks last_coalesced_timestamp_;
+
+ // Whether the received event was originally cancelable or not. The compositor
+ // input handler can change the event based on presence of event handlers so
+ // this is the state at which the renderer received the event from the
+ // browser.
+ bool originally_cancelable_;
};
class CONTENT_EXPORT MainThreadEventQueueClient {
@@ -124,7 +133,7 @@ class CONTENT_EXPORT MainThreadEventQueue
const ui::LatencyInfo& latency,
InputEventDispatchType dispatch_type,
InputEventAckState ack_result);
- void DispatchRafAlignedInput();
+ void DispatchRafAlignedInput(double frame_time_sec);
// Call once the main thread has handled an outstanding |type| event
// in flight.
@@ -167,6 +176,7 @@ class CONTENT_EXPORT MainThreadEventQueue
WebInputEventQueue<EventWithDispatchType> events_;
bool sent_main_frame_request_;
+ double last_async_touch_move_timestamp_;
};
// Lock used to serialize |shared_state_|.

Powered by Google App Engine
This is Rietveld 408576698