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

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: rebase & remove CrackMessage() 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
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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 INPUT_EVENT_ACK_STATE_CONSUMED : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 849 INPUT_EVENT_ACK_STATE_CONSUMED : INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
850 if (!processed && input_event->type == WebInputEvent::TouchStart) { 850 if (!processed && input_event->type == WebInputEvent::TouchStart) {
851 const WebTouchEvent& touch_event = 851 const WebTouchEvent& touch_event =
852 *static_cast<const WebTouchEvent*>(input_event); 852 *static_cast<const WebTouchEvent*>(input_event);
853 ack_result = HasTouchEventHandlersAt(touch_event.touches[0].position) ? 853 ack_result = HasTouchEventHandlersAt(touch_event.touches[0].position) ?
854 INPUT_EVENT_ACK_STATE_NOT_CONSUMED : 854 INPUT_EVENT_ACK_STATE_NOT_CONSUMED :
855 INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; 855 INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
856 } 856 }
857 857
858 IPC::Message* response = 858 IPC::Message* response =
859 new InputHostMsg_HandleInputEvent_ACK(routing_id_, input_event->type, 859 new InputHostMsg_HandleInputEvent_ACK(routing_id_,
860 ack_result); 860 input_event->type,
861 ack_result,
862 latency_info);
861 bool event_type_gets_rate_limited = 863 bool event_type_gets_rate_limited =
862 input_event->type == WebInputEvent::MouseMove || 864 input_event->type == WebInputEvent::MouseMove ||
863 input_event->type == WebInputEvent::MouseWheel || 865 input_event->type == WebInputEvent::MouseWheel ||
864 WebInputEvent::isTouchEventType(input_event->type); 866 WebInputEvent::isTouchEventType(input_event->type);
865 867
866 bool frame_pending = paint_aggregator_.HasPendingUpdate(); 868 bool frame_pending = paint_aggregator_.HasPendingUpdate();
867 if (is_accelerated_compositing_active_) { 869 if (is_accelerated_compositing_active_) {
868 frame_pending = compositor_ && 870 frame_pending = compositor_ &&
869 compositor_->commitRequested(); 871 compositor_->commitRequested();
870 } 872 }
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 2485
2484 if (!context->InitializeWithDefaultBufferSizes( 2486 if (!context->InitializeWithDefaultBufferSizes(
2485 attributes, 2487 attributes,
2486 false /* bind generates resources */, 2488 false /* bind generates resources */,
2487 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) 2489 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) )
2488 return NULL; 2490 return NULL;
2489 return context.release(); 2491 return context.release();
2490 } 2492 }
2491 2493
2492 } // namespace content 2494 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698