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

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

Issue 1955643002: Add UMA metric to track the time saved on making events passive during fling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set dispatch type to forcepassive Created 4 years, 7 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.cc
diff --git a/content/renderer/input/main_thread_event_queue.cc b/content/renderer/input/main_thread_event_queue.cc
index a16d2d462799976c571185c9855bd0f81ae8bb18..deb4318ddeb97c1081580229a03134ca072bf157 100644
--- a/content/renderer/input/main_thread_event_queue.cc
+++ b/content/renderer/input/main_thread_event_queue.cc
@@ -71,6 +71,12 @@ bool MainThreadEventQueue::HandleEvent(
if (non_blocking) {
modified_dispatch_type_event.event.dispatchType =
blink::WebInputEvent::ListenersNonBlockingPassive;
+ } else {
+ if (modified_dispatch_type_event.event.type ==
+ blink::WebInputEvent::TouchStart &&
+ modified_dispatch_type_event.event.shouldForceBePassive)
+ modified_dispatch_type_event.event.dispatchType =
+ blink::WebInputEvent::ListenersForcedNonBlockingPassive;
dtapuska 2016/05/05 19:58:27 If you set this then you need to make sure an ack
}
if (touch_events_.state() == WebInputEventQueueState::ITEM_PENDING) {

Powered by Google App Engine
This is Rietveld 408576698