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

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: More testing 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
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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 // handlers are heavy and rate limit them. 1068 // handlers are heavy and rate limit them.
1069 bool rate_limiting_wanted = true; 1069 bool rate_limiting_wanted = true;
1070 if (base::TimeTicks::IsHighResNowFastAndReliable()) { 1070 if (base::TimeTicks::IsHighResNowFastAndReliable()) {
1071 base::TimeTicks end_time = base::TimeTicks::HighResNow(); 1071 base::TimeTicks end_time = base::TimeTicks::HighResNow();
1072 total_input_handling_time_this_frame_ += (end_time - start_time); 1072 total_input_handling_time_this_frame_ += (end_time - start_time);
1073 rate_limiting_wanted = 1073 rate_limiting_wanted =
1074 total_input_handling_time_this_frame_.InMicroseconds() > 1074 total_input_handling_time_this_frame_.InMicroseconds() >
1075 kInputHandlingTimeThrottlingThresholdMicroseconds; 1075 kInputHandlingTimeThrottlingThresholdMicroseconds;
1076 } 1076 }
1077 1077
1078 if (!WebInputEventTraits::IgnoresAckDisposition(input_event->type)) { 1078 if (!WebInputEventTraits::IgnoresAckDisposition(*input_event)) {
1079 scoped_ptr<IPC::Message> response( 1079 scoped_ptr<IPC::Message> response(
1080 new InputHostMsg_HandleInputEvent_ACK(routing_id_, 1080 new InputHostMsg_HandleInputEvent_ACK(routing_id_,
1081 input_event->type, 1081 input_event->type,
1082 ack_result, 1082 ack_result,
1083 swap_latency_info)); 1083 swap_latency_info));
1084 if (rate_limiting_wanted && event_type_can_be_rate_limited && 1084 if (rate_limiting_wanted && event_type_can_be_rate_limited &&
1085 frame_pending && !is_hidden_) { 1085 frame_pending && !is_hidden_) {
1086 // We want to rate limit the input events in this case, so we'll wait for 1086 // We want to rate limit the input events in this case, so we'll wait for
1087 // painting to finish before ACKing this message. 1087 // painting to finish before ACKing this message.
1088 TRACE_EVENT_INSTANT0("renderer", 1088 TRACE_EVENT_INSTANT0("renderer",
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 2368
2369 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { 2369 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) {
2370 swapped_out_frames_.AddObserver(frame); 2370 swapped_out_frames_.AddObserver(frame);
2371 } 2371 }
2372 2372
2373 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { 2373 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) {
2374 swapped_out_frames_.RemoveObserver(frame); 2374 swapped_out_frames_.RemoveObserver(frame);
2375 } 2375 }
2376 2376
2377 } // namespace content 2377 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698