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

Side by Side Diff: Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp

Issue 13880009: Include timestamp with vsync-delineating input events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased. Created 7 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 m_client->didHandleInputEvent(); 105 m_client->didHandleInputEvent();
106 break; 106 break;
107 case DidNotHandle: 107 case DidNotHandle:
108 m_client->didNotHandleInputEvent(true /* sendToWidget */); 108 m_client->didNotHandleInputEvent(true /* sendToWidget */);
109 break; 109 break;
110 case DropEvent: 110 case DropEvent:
111 m_client->didNotHandleInputEvent(false /* sendToWidget */); 111 m_client->didNotHandleInputEvent(false /* sendToWidget */);
112 break; 112 break;
113 } 113 }
114 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync) 114 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync)
115 m_inputHandlerClient->didReceiveLastInputEventForVSync(); 115 m_inputHandlerClient->didReceiveLastInputEventForVSync(event.timeStampSe conds);
116 } 116 }
117 117
118 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h andleInputEventInternal(const WebInputEvent& event) 118 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h andleInputEventInternal(const WebInputEvent& event)
119 { 119 {
120 if (event.type == WebInputEvent::MouseWheel) { 120 if (event.type == WebInputEvent::MouseWheel) {
121 const WebMouseWheelEvent& wheelEvent = *static_cast<const WebMouseWheelE vent*>(&event); 121 const WebMouseWheelEvent& wheelEvent = *static_cast<const WebMouseWheelE vent*>(&event);
122 WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient- >scrollBegin(WebPoint(wheelEvent.x, wheelEvent.y), WebInputHandlerClient::Scroll InputTypeWheel); 122 WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient- >scrollBegin(WebPoint(wheelEvent.x, wheelEvent.y), WebInputHandlerClient::Scroll InputTypeWheel);
123 switch (scrollStatus) { 123 switch (scrollStatus) {
124 case WebInputHandlerClient::ScrollStatusStarted: { 124 case WebInputHandlerClient::ScrollStatusStarted: {
125 TRACE_EVENT_INSTANT2("webkit", "WebCompositorInputHandlerImpl::handl eInput wheel scroll", "deltaX", -wheelEvent.deltaX, "deltaY", -wheelEvent.deltaY ); 125 TRACE_EVENT_INSTANT2("webkit", "WebCompositorInputHandlerImpl::handl eInput wheel scroll", "deltaX", -wheelEvent.deltaX, "deltaY", -wheelEvent.deltaY );
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 m_flingParameters.cumulativeScroll.height += increment.height; 360 m_flingParameters.cumulativeScroll.height += increment.height;
361 } 361 }
362 } 362 }
363 363
364 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging() 364 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging()
365 { 365 {
366 m_flingActiveOnMainThread = false; 366 m_flingActiveOnMainThread = false;
367 } 367 }
368 368
369 } 369 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698