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

Unified Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 2715623002: Add a passthrough touch event queue. (Closed)
Patch Set: Rebase on throttling change 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/browser/renderer_host/input/input_router_impl.cc
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 86ed1c67e136274a0a94f783507a5b1ce3db29f4..2de801a711b83c6995ac7ff79ee225a1b7d755d6 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -17,6 +17,7 @@
#include "content/browser/renderer_host/input/input_ack_handler.h"
#include "content/browser/renderer_host/input/input_router_client.h"
#include "content/browser/renderer_host/input/legacy_touch_event_queue.h"
+#include "content/browser/renderer_host/input/passthrough_touch_event_queue.h"
#include "content/browser/renderer_host/input/touch_event_queue.h"
#include "content/browser/renderer_host/input/touchpad_tap_suppression_controller.h"
#include "content/common/content_constants_internal.h"
@@ -91,9 +92,15 @@ InputRouterImpl::InputRouterImpl(IPC::Sender* sender,
wheel_event_queue_(this,
base::FeatureList::IsEnabled(
features::kTouchpadAndWheelScrollLatching)),
- touch_event_queue_(new LegacyTouchEventQueue(this, config.touch_config)),
gesture_event_queue_(this, this, config.gesture_config),
device_scale_factor_(1.f) {
+ if (base::FeatureList::IsEnabled(features::kRafAlignedTouchInputEvents))
+ touch_event_queue_.reset(
+ new PassthroughTouchEventQueue(this, config.touch_config));
+ else
+ touch_event_queue_.reset(
+ new LegacyTouchEventQueue(this, config.touch_config));
+
DCHECK(sender);
DCHECK(client);
DCHECK(ack_handler);

Powered by Google App Engine
This is Rietveld 408576698