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

Unified Diff: ui/events/blink/web_input_event_traits.cc

Issue 2734563002: Re-enable passthrough touch event queue. (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: ui/events/blink/web_input_event_traits.cc
diff --git a/ui/events/blink/web_input_event_traits.cc b/ui/events/blink/web_input_event_traits.cc
index 9ddc7589419d3f427596beb53a2b044073fea836..94f216da959e8f37b18d5ad128164ada24d9d52f 100644
--- a/ui/events/blink/web_input_event_traits.cc
+++ b/ui/events/blink/web_input_event_traits.cc
@@ -197,7 +197,9 @@ WebScopedInputEvent WebInputEventTraits::Clone(const WebInputEvent& event) {
return scoped_event;
}
-bool WebInputEventTraits::ShouldBlockEventStream(const WebInputEvent& event) {
+bool WebInputEventTraits::ShouldBlockEventStream(
+ const WebInputEvent& event,
+ bool raf_aligned_touch_enabled) {
switch (event.type()) {
case WebInputEvent::MouseDown:
case WebInputEvent::MouseUp:
@@ -228,9 +230,16 @@ bool WebInputEventTraits::ShouldBlockEventStream(const WebInputEvent& event) {
return static_cast<const WebTouchEvent&>(event).dispatchType ==
WebInputEvent::Blocking;
- // Touch move events may be non-blocking but are always explicitly
- // acknowledge by the renderer so they block the event stream.
case WebInputEvent::TouchMove:
+ // Non-blocking touch moves can be ack'd right away if raf_aligned
+ // touch is enabled.
+ if (raf_aligned_touch_enabled) {
+ return static_cast<const WebTouchEvent&>(event).dispatchType ==
+ WebInputEvent::Blocking;
+ }
+ // Touch move events may be non-blocking but are always explicitly
+ // acknowledge by the renderer so they block the event stream.
+ return true;
default:
return true;
}

Powered by Google App Engine
This is Rietveld 408576698