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

Side by Side Diff: content/renderer/render_widget.cc

Issue 245833002: Implement async touchmove dispatch during scroll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win Created 6 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
« no previous file with comments | « content/renderer/input/input_event_filter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_synthetic_delay.h" 10 #include "base/debug/trace_event_synthetic_delay.h"
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 // handlers are heavy and rate limit them. 1071 // handlers are heavy and rate limit them.
1072 bool rate_limiting_wanted = true; 1072 bool rate_limiting_wanted = true;
1073 if (base::TimeTicks::IsHighResNowFastAndReliable()) { 1073 if (base::TimeTicks::IsHighResNowFastAndReliable()) {
1074 base::TimeTicks end_time = base::TimeTicks::HighResNow(); 1074 base::TimeTicks end_time = base::TimeTicks::HighResNow();
1075 total_input_handling_time_this_frame_ += (end_time - start_time); 1075 total_input_handling_time_this_frame_ += (end_time - start_time);
1076 rate_limiting_wanted = 1076 rate_limiting_wanted =
1077 total_input_handling_time_this_frame_.InMicroseconds() > 1077 total_input_handling_time_this_frame_.InMicroseconds() >
1078 kInputHandlingTimeThrottlingThresholdMicroseconds; 1078 kInputHandlingTimeThrottlingThresholdMicroseconds;
1079 } 1079 }
1080 1080
1081 if (!WebInputEventTraits::IgnoresAckDisposition(input_event->type)) { 1081 if (!WebInputEventTraits::IgnoresAckDisposition(*input_event)) {
1082 scoped_ptr<IPC::Message> response( 1082 scoped_ptr<IPC::Message> response(
1083 new InputHostMsg_HandleInputEvent_ACK(routing_id_, 1083 new InputHostMsg_HandleInputEvent_ACK(routing_id_,
1084 input_event->type, 1084 input_event->type,
1085 ack_result, 1085 ack_result,
1086 swap_latency_info)); 1086 swap_latency_info));
1087 if (rate_limiting_wanted && event_type_can_be_rate_limited && 1087 if (rate_limiting_wanted && event_type_can_be_rate_limited &&
1088 frame_pending && !is_hidden_) { 1088 frame_pending && !is_hidden_) {
1089 // We want to rate limit the input events in this case, so we'll wait for 1089 // We want to rate limit the input events in this case, so we'll wait for
1090 // painting to finish before ACKing this message. 1090 // painting to finish before ACKing this message.
1091 TRACE_EVENT_INSTANT0("renderer", 1091 TRACE_EVENT_INSTANT0("renderer",
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 2373
2374 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { 2374 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) {
2375 swapped_out_frames_.AddObserver(frame); 2375 swapped_out_frames_.AddObserver(frame);
2376 } 2376 }
2377 2377
2378 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { 2378 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) {
2379 swapped_out_frames_.RemoveObserver(frame); 2379 swapped_out_frames_.RemoveObserver(frame);
2380 } 2380 }
2381 2381
2382 } // namespace content 2382 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_event_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698