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

Side by Side Diff: content/renderer/gpu/input_handler_proxy.cc

Issue 15651006: cc: Disable LastInputEventForBeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@nobfafteri
Patch Set: Update bug# in comment Created 7 years, 6 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/renderer/gpu/input_handler_proxy.h" 5 #include "content/renderer/gpu/input_handler_proxy.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/renderer/gpu/input_handler_proxy_client.h" 9 #include "content/renderer/gpu/input_handler_proxy_client.h"
10 #include "third_party/WebKit/public/platform/Platform.h" 10 #include "third_party/WebKit/public/platform/Platform.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 void InputHandlerProxy::SetClient(InputHandlerProxyClient* client) { 46 void InputHandlerProxy::SetClient(InputHandlerProxyClient* client) {
47 DCHECK(!client_ || !client); 47 DCHECK(!client_ || !client);
48 client_ = client; 48 client_ = client;
49 } 49 }
50 50
51 InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent( 51 InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent(
52 const WebInputEvent& event) { 52 const WebInputEvent& event) {
53 DCHECK(client_); 53 DCHECK(client_);
54 DCHECK(input_handler_); 54 DCHECK(input_handler_);
55 55 return HandleInputEventInternal(event);
jamesr 2013/06/05 18:06:40 hmm, well now there's no reason at all for the Han
56 InputHandlerProxy::EventDisposition disposition =
57 HandleInputEventInternal(event);
58 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync) {
59 input_handler_->DidReceiveLastInputEventForBeginFrame(
60 base::TimeTicks::FromInternalValue(event.timeStampSeconds *
61 base::Time::kMicrosecondsPerSecond));
62 }
63 return disposition;
64 } 56 }
65 57
66 InputHandlerProxy::EventDisposition 58 InputHandlerProxy::EventDisposition
67 InputHandlerProxy::HandleInputEventInternal(const WebInputEvent& event) { 59 InputHandlerProxy::HandleInputEventInternal(const WebInputEvent& event) {
68 if (event.type == WebInputEvent::MouseWheel) { 60 if (event.type == WebInputEvent::MouseWheel) {
69 const WebMouseWheelEvent& wheel_event = 61 const WebMouseWheelEvent& wheel_event =
70 *static_cast<const WebMouseWheelEvent*>(&event); 62 *static_cast<const WebMouseWheelEvent*>(&event);
71 if (wheel_event.scrollByPage) { 63 if (wheel_event.scrollByPage) {
72 // TODO(jamesr): We don't properly handle scroll by page in the compositor 64 // TODO(jamesr): We don't properly handle scroll by page in the compositor
73 // thread, so punt it to the main thread. http://crbug.com/236639 65 // thread, so punt it to the main thread. http://crbug.com/236639
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 TRACE_EVENT2("renderer", 404 TRACE_EVENT2("renderer",
413 "InputHandlerProxy::notifyCurrentFlingVelocity", 405 "InputHandlerProxy::notifyCurrentFlingVelocity",
414 "vx", 406 "vx",
415 velocity.width, 407 velocity.width,
416 "vy", 408 "vy",
417 velocity.height); 409 velocity.height);
418 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity)); 410 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity));
419 } 411 }
420 412
421 } // namespace content 413 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698