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

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

Issue 2296693003: Don't RAF align touch moves that are blocking. (Closed)
Patch Set: Add comment Created 4 years, 4 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 | « no previous file | content/renderer/input/main_thread_event_queue_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/main_thread_event_queue.cc
diff --git a/content/renderer/input/main_thread_event_queue.cc b/content/renderer/input/main_thread_event_queue.cc
index 5c872c0ef2cc04a65eaf42274ce5ee0c57b574ae..c34e08a18da0a8fd20871f5faf8cf53f18834ae7 100644
--- a/content/renderer/input/main_thread_event_queue.cc
+++ b/content/renderer/input/main_thread_event_queue.cc
@@ -23,9 +23,14 @@ const size_t kTenSeconds = 10 * 1000 * 1000;
bool isContinuousEvent(const std::unique_ptr<EventWithDispatchType>& event) {
switch (event->event().type) {
case blink::WebInputEvent::MouseMove:
- case blink::WebInputEvent::TouchMove:
case blink::WebInputEvent::MouseWheel:
return true;
+ case blink::WebInputEvent::TouchMove:
+ // TouchMoves that are blocking end up blocking scroll. Do not treat
+ // them as continuous events otherwise we will end up waiting up to an
+ // additional frame.
+ return static_cast<const blink::WebTouchEvent&>(event->event())
+ .dispatchType != blink::WebInputEvent::Blocking;
default:
return false;
}
« no previous file with comments | « no previous file | content/renderer/input/main_thread_event_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698