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

Side by Side Diff: content/renderer/input/input_event_filter_unittest.cc

Issue 2835673002: Disable raf alignment when the compositor doesn't generate begin frames. (Closed)
Patch Set: Fix typo Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/input/main_thread_event_queue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <new> 7 #include <new>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 ui::LatencyInfo(), 252 ui::LatencyInfo(),
253 ShouldBlockEventStream(events[i]) 253 ShouldBlockEventStream(events[i])
254 ? InputEventDispatchType::DISPATCH_TYPE_BLOCKING 254 ? InputEventDispatchType::DISPATCH_TYPE_BLOCKING
255 : InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING)); 255 : InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING));
256 } 256 }
257 257
258 AddMessagesToFilter(messages); 258 AddMessagesToFilter(messages);
259 } 259 }
260 260
261 void RegisterRoute() { 261 void RegisterRoute() {
262 input_event_queue_ = 262 input_event_queue_ = new MainThreadEventQueue(this, main_task_runner_,
263 new MainThreadEventQueue(this, main_task_runner_, &renderer_scheduler_); 263 &renderer_scheduler_, true);
264 filter_->RegisterRoutingID(kTestRoutingID, input_event_queue_); 264 filter_->RegisterRoutingID(kTestRoutingID, input_event_queue_);
265 } 265 }
266 266
267 InputEventAckState HandleInputEvent( 267 InputEventAckState HandleInputEvent(
268 const blink::WebCoalescedInputEvent& event, 268 const blink::WebCoalescedInputEvent& event,
269 const ui::LatencyInfo& latency, 269 const ui::LatencyInfo& latency,
270 InputEventDispatchType dispatch_type) override { 270 InputEventDispatchType dispatch_type) override {
271 message_recorder_.AppendEvent(event, dispatch_type); 271 message_recorder_.AppendEvent(event, dispatch_type);
272 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 272 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
273 } 273 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 const WebInputEvent& event = message.event(); 602 const WebInputEvent& event = message.event();
603 InputEventDispatchType dispatch_type = message.dispatch_type(); 603 InputEventDispatchType dispatch_type = message.dispatch_type();
604 604
605 EXPECT_EQ(kBlockingEvents[0].size(), event.size()); 605 EXPECT_EQ(kBlockingEvents[0].size(), event.size());
606 EXPECT_TRUE(memcmp(&kBlockingEvents[0], &event, event.size()) == 0); 606 EXPECT_TRUE(memcmp(&kBlockingEvents[0], &event, event.size()) == 0);
607 EXPECT_EQ(InputEventDispatchType::DISPATCH_TYPE_BLOCKING, dispatch_type); 607 EXPECT_EQ(InputEventDispatchType::DISPATCH_TYPE_BLOCKING, dispatch_type);
608 } 608 }
609 } 609 }
610 610
611 } // namespace content 611 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/input/main_thread_event_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698