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

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

Issue 2482453002: Don't restart the hang renderer timeout on messages ack'd from the compositor thread. (Closed)
Patch Set: Fix mac build Created 4 years, 1 month 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ~NullInputRouterClient() override {} 78 ~NullInputRouterClient() override {}
79 79
80 // InputRouterClient 80 // InputRouterClient
81 InputEventAckState FilterInputEvent( 81 InputEventAckState FilterInputEvent(
82 const blink::WebInputEvent& input_event, 82 const blink::WebInputEvent& input_event,
83 const ui::LatencyInfo& latency_info) override { 83 const ui::LatencyInfo& latency_info) override {
84 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 84 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
85 } 85 }
86 void IncrementInFlightEventCount( 86 void IncrementInFlightEventCount(
87 blink::WebInputEvent::Type event_type) override {} 87 blink::WebInputEvent::Type event_type) override {}
88 void DecrementInFlightEventCount() override {} 88 void DecrementInFlightEventCount(InputEventAckSource ack_source) override {}
89 void OnHasTouchEventHandlers(bool has_handlers) override {} 89 void OnHasTouchEventHandlers(bool has_handlers) override {}
90 void DidFlush() override {} 90 void DidFlush() override {}
91 void DidOverscroll(const ui::DidOverscrollParams& params) override {} 91 void DidOverscroll(const ui::DidOverscrollParams& params) override {}
92 void DidStopFlinging() override {} 92 void DidStopFlinging() override {}
93 void ForwardGestureEventWithLatencyInfo( 93 void ForwardGestureEventWithLatencyInfo(
94 const blink::WebGestureEvent& event, 94 const blink::WebGestureEvent& event,
95 const ui::LatencyInfo& latency_info) override {} 95 const ui::LatencyInfo& latency_info) override {}
96 }; 96 };
97 97
98 class NullIPCSender : public IPC::Sender { 98 class NullIPCSender : public IPC::Sender {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 241
242 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) { 242 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) {
243 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency)); 243 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency));
244 } 244 }
245 245
246 void SendEventAckIfNecessary(const blink::WebInputEvent& event, 246 void SendEventAckIfNecessary(const blink::WebInputEvent& event,
247 InputEventAckState ack_result) { 247 InputEventAckState ack_result) {
248 if (!ui::WebInputEventTraits::ShouldBlockEventStream(event)) 248 if (!ui::WebInputEventTraits::ShouldBlockEventStream(event))
249 return; 249 return;
250 InputEventAck ack(event.type, ack_result); 250 InputEventAck ack(InputEventAckSource::COMPOSITOR_THREAD, event.type,
251 ack_result);
251 InputHostMsg_HandleInputEvent_ACK response(0, ack); 252 InputHostMsg_HandleInputEvent_ACK response(0, ack);
252 input_router_->OnMessageReceived(response); 253 input_router_->OnMessageReceived(response);
253 } 254 }
254 255
255 void OnHasTouchEventHandlers(bool has_handlers) { 256 void OnHasTouchEventHandlers(bool has_handlers) {
256 input_router_->OnMessageReceived( 257 input_router_->OnMessageReceived(
257 ViewHostMsg_HasTouchEventHandlers(0, has_handlers)); 258 ViewHostMsg_HasTouchEventHandlers(0, has_handlers));
258 } 259 }
259 260
260 size_t GetAndResetSentEventCount() { 261 size_t GetAndResetSentEventCount() {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 386
386 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { 387 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) {
387 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", 388 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ",
388 kDefaultSteps, 389 kDefaultSteps,
389 kDefaultOrigin, 390 kDefaultOrigin,
390 kDefaultDistance, 391 kDefaultDistance,
391 kDefaultIterations); 392 kDefaultIterations);
392 } 393 }
393 394
394 } // namespace content 395 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698