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

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

Issue 19670007: Send input event's LatencyInfo back from renderer to browser when acked (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix compile error in immediate_input_router_unittest.cc Created 7 years, 4 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/gpu/input_event_filter_unittest.cc ('k') | ui/base/latency_info.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 (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/logging.h" 10 #include "base/logging.h"
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 INPUT_EVENT_ACK_STATE_CONSUMED : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 861 INPUT_EVENT_ACK_STATE_CONSUMED : INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
862 if (!processed && input_event->type == WebInputEvent::TouchStart) { 862 if (!processed && input_event->type == WebInputEvent::TouchStart) {
863 const WebTouchEvent& touch_event = 863 const WebTouchEvent& touch_event =
864 *static_cast<const WebTouchEvent*>(input_event); 864 *static_cast<const WebTouchEvent*>(input_event);
865 ack_result = HasTouchEventHandlersAt(touch_event.touches[0].position) ? 865 ack_result = HasTouchEventHandlersAt(touch_event.touches[0].position) ?
866 INPUT_EVENT_ACK_STATE_NOT_CONSUMED : 866 INPUT_EVENT_ACK_STATE_NOT_CONSUMED :
867 INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; 867 INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
868 } 868 }
869 869
870 IPC::Message* response = 870 IPC::Message* response =
871 new InputHostMsg_HandleInputEvent_ACK(routing_id_, input_event->type, 871 new InputHostMsg_HandleInputEvent_ACK(routing_id_,
872 ack_result); 872 input_event->type,
873 ack_result,
874 latency_info);
873 bool event_type_gets_rate_limited = 875 bool event_type_gets_rate_limited =
874 input_event->type == WebInputEvent::MouseMove || 876 input_event->type == WebInputEvent::MouseMove ||
875 input_event->type == WebInputEvent::MouseWheel || 877 input_event->type == WebInputEvent::MouseWheel ||
876 WebInputEvent::isTouchEventType(input_event->type); 878 WebInputEvent::isTouchEventType(input_event->type);
877 879
878 bool frame_pending = paint_aggregator_.HasPendingUpdate(); 880 bool frame_pending = paint_aggregator_.HasPendingUpdate();
879 if (is_accelerated_compositing_active_) { 881 if (is_accelerated_compositing_active_) {
880 frame_pending = compositor_ && 882 frame_pending = compositor_ &&
881 compositor_->commitRequested(); 883 compositor_->commitRequested();
882 } 884 }
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 2522
2521 if (!context->InitializeWithDefaultBufferSizes( 2523 if (!context->InitializeWithDefaultBufferSizes(
2522 attributes, 2524 attributes,
2523 false /* bind generates resources */, 2525 false /* bind generates resources */,
2524 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) 2526 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) )
2525 return NULL; 2527 return NULL;
2526 return context.release(); 2528 return context.release();
2527 } 2529 }
2528 2530
2529 } // namespace content 2531 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/input_event_filter_unittest.cc ('k') | ui/base/latency_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698