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

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

Issue 997283002: Coalesce async touch move events until the ack back from render (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "content/browser/renderer_host/input/input_ack_handler.h" 7 #include "content/browser/renderer_host/input/input_ack_handler.h"
8 #include "content/browser/renderer_host/input/input_router_client.h" 8 #include "content/browser/renderer_host/input/input_router_client.h"
9 #include "content/browser/renderer_host/input/input_router_impl.h" 9 #include "content/browser/renderer_host/input/input_router_impl.h"
10 #include "content/common/input/web_input_event_traits.h" 10 #include "content/common/input/web_input_event_traits.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 input_router_->SendGestureEvent( 226 input_router_->SendGestureEvent(
227 GestureEventWithLatencyInfo(gesture, latency)); 227 GestureEventWithLatencyInfo(gesture, latency));
228 } 228 }
229 229
230 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) { 230 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) {
231 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency)); 231 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency));
232 } 232 }
233 233
234 void SendEventAckIfNecessary(const blink::WebInputEvent& event, 234 void SendEventAckIfNecessary(const blink::WebInputEvent& event,
235 InputEventAckState ack_result) { 235 InputEventAckState ack_result) {
236 if (WebInputEventTraits::IgnoresAckDisposition(event)) 236 if (!WebInputEventTraits::WillReceiveAckFromRenderer(event))
237 return; 237 return;
238 InputHostMsg_HandleInputEvent_ACK_Params ack; 238 InputHostMsg_HandleInputEvent_ACK_Params ack;
239 ack.type = event.type; 239 ack.type = event.type;
240 ack.state = ack_result; 240 ack.state = ack_result;
241 InputHostMsg_HandleInputEvent_ACK response(0, ack); 241 InputHostMsg_HandleInputEvent_ACK response(0, ack);
242 input_router_->OnMessageReceived(response); 242 input_router_->OnMessageReceived(response);
243 } 243 }
244 244
245 void OnHasTouchEventHandlers(bool has_handlers) { 245 void OnHasTouchEventHandlers(bool has_handlers) {
246 input_router_->OnMessageReceived( 246 input_router_->OnMessageReceived(
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { 377 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) {
378 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", 378 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ",
379 kDefaultSteps, 379 kDefaultSteps,
380 kDefaultOrigin, 380 kDefaultOrigin,
381 kDefaultDistance, 381 kDefaultDistance,
382 kDefaultIterations); 382 kDefaultIterations);
383 } 383 }
384 384
385 } // namespace content 385 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698