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

Side by Side Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 2734563002: Re-enable passthrough touch event queue. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/input/input_router_impl.h" 5 #include "content/browser/renderer_host/input/input_router_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 select_message_pending_(false), 86 select_message_pending_(false),
87 move_caret_pending_(false), 87 move_caret_pending_(false),
88 current_ack_source_(ACK_SOURCE_NONE), 88 current_ack_source_(ACK_SOURCE_NONE),
89 flush_requested_(false), 89 flush_requested_(false),
90 active_renderer_fling_count_(0), 90 active_renderer_fling_count_(0),
91 touch_scroll_started_sent_(false), 91 touch_scroll_started_sent_(false),
92 wheel_event_queue_(this, 92 wheel_event_queue_(this,
93 base::FeatureList::IsEnabled( 93 base::FeatureList::IsEnabled(
94 features::kTouchpadAndWheelScrollLatching)), 94 features::kTouchpadAndWheelScrollLatching)),
95 gesture_event_queue_(this, this, config.gesture_config), 95 gesture_event_queue_(this, this, config.gesture_config),
96 device_scale_factor_(1.f) { 96 device_scale_factor_(1.f),
97 // TODO(dtapuska): Figure out regression caused by activating 97 raf_aligned_touch_enabled_(
98 // the passthrough queue. crbug.com/697871 98 base::FeatureList::IsEnabled(features::kRafAlignedTouchInputEvents)) {
99 if (false && 99 if (raf_aligned_touch_enabled_) {
100 base::FeatureList::IsEnabled(features::kRafAlignedTouchInputEvents)) {
101 touch_event_queue_.reset( 100 touch_event_queue_.reset(
102 new PassthroughTouchEventQueue(this, config.touch_config)); 101 new PassthroughTouchEventQueue(this, config.touch_config));
103 } else { 102 } else {
104 touch_event_queue_.reset( 103 touch_event_queue_.reset(
105 new LegacyTouchEventQueue(this, config.touch_config)); 104 new LegacyTouchEventQueue(this, config.touch_config));
106 } 105 }
107 106
108 DCHECK(sender); 107 DCHECK(sender);
109 DCHECK(client); 108 DCHECK(client);
110 DCHECK(ack_handler); 109 DCHECK(ack_handler);
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 OfferToHandlers(input_event, latency_info); 372 OfferToHandlers(input_event, latency_info);
374 } 373 }
375 374
376 void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event, 375 void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event,
377 const ui::LatencyInfo& latency_info) { 376 const ui::LatencyInfo& latency_info) {
378 output_stream_validator_.Validate(input_event); 377 output_stream_validator_.Validate(input_event);
379 378
380 if (OfferToClient(input_event, latency_info)) 379 if (OfferToClient(input_event, latency_info))
381 return; 380 return;
382 381
383 bool should_block = WebInputEventTraits::ShouldBlockEventStream(input_event); 382 bool should_block = WebInputEventTraits::ShouldBlockEventStream(
383 input_event, raf_aligned_touch_enabled_);
384 OfferToRenderer(input_event, latency_info, 384 OfferToRenderer(input_event, latency_info,
385 should_block 385 should_block
386 ? InputEventDispatchType::DISPATCH_TYPE_BLOCKING 386 ? InputEventDispatchType::DISPATCH_TYPE_BLOCKING
387 : InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING); 387 : InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING);
388 388
389 // Generate a synthetic ack if the event was sent so it doesn't block. 389 // Generate a synthetic ack if the event was sent so it doesn't block.
390 if (!should_block) { 390 if (!should_block) {
391 ProcessInputEventAck( 391 ProcessInputEventAck(
392 input_event.type(), INPUT_EVENT_ACK_STATE_IGNORED, latency_info, 392 input_event.type(), INPUT_EVENT_ACK_STATE_IGNORED, latency_info,
393 WebInputEventTraits::GetUniqueTouchEventId(input_event), 393 WebInputEventTraits::GetUniqueTouchEventId(input_event),
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 DCHECK(global_touch_position_.find(touch_point->id) == 669 DCHECK(global_touch_position_.find(touch_point->id) ==
670 global_touch_position_.end()); 670 global_touch_position_.end());
671 global_touch_position_[touch_point->id] = gfx::Point( 671 global_touch_position_[touch_point->id] = gfx::Point(
672 touch_point->screenPosition.x, touch_point->screenPosition.y); 672 touch_point->screenPosition.x, touch_point->screenPosition.y);
673 } 673 }
674 } 674 }
675 } 675 }
676 } 676 }
677 677
678 } // namespace content 678 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698