Title: [136421] trunk/Source
Revision
136421
Author
commit-qu...@webkit.org
Date
2012-12-03 11:15:36 -0800 (Mon, 03 Dec 2012)

Log Message

[chromium] Tell WebInputHandlerClient when end of input is reached for current vsync period
https://bugs.webkit.org/show_bug.cgi?id=103648

Patch by Sami Kyostila <skyos...@chromium.org> on 2012-12-03
Reviewed by James Robinson.

Let the WebInputHandlerClient know when we've received the final input event
for the current vsync period.

Test: WebCompositorInputHandlerImplTest.lastInputEventForVSync

Source/Platform:

* chromium/public/WebInputHandlerClient.h:
(WebKit::WebInputHandlerClient::didReceiveLastInputEventForVSync):
(WebInputHandlerClient):

Source/WebKit/chromium:

* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::handleInputEvent):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (136420 => 136421)


--- trunk/Source/Platform/ChangeLog	2012-12-03 19:13:39 UTC (rev 136420)
+++ trunk/Source/Platform/ChangeLog	2012-12-03 19:15:36 UTC (rev 136421)
@@ -1,3 +1,19 @@
+2012-12-03  Sami Kyostila  <skyos...@chromium.org>
+
+        [chromium] Tell WebInputHandlerClient when end of input is reached for current vsync period
+        https://bugs.webkit.org/show_bug.cgi?id=103648
+
+        Reviewed by James Robinson.
+
+        Let the WebInputHandlerClient know when we've received the final input event
+        for the current vsync period.
+
+        Test: WebCompositorInputHandlerImplTest.lastInputEventForVSync
+
+        * chromium/public/WebInputHandlerClient.h:
+        (WebKit::WebInputHandlerClient::didReceiveLastInputEventForVSync):
+        (WebInputHandlerClient):
+
 2012-11-28  Tommy Widenflycht  <tom...@google.com>
 
         Add basic implementation for MediaStreamAudioDestinationNode

Modified: trunk/Source/Platform/chromium/public/WebInputHandlerClient.h (136420 => 136421)


--- trunk/Source/Platform/chromium/public/WebInputHandlerClient.h	2012-12-03 19:13:39 UTC (rev 136420)
+++ trunk/Source/Platform/chromium/public/WebInputHandlerClient.h	2012-12-03 19:15:36 UTC (rev 136421)
@@ -73,6 +73,9 @@
     // Request another callback to WebInputHandler::animate().
     virtual void scheduleAnimation() = 0;
 
+    // Indicate that the final input event for the current vsync interval was received.
+    virtual void didReceiveLastInputEventForVSync() { }
+
 protected:
     virtual ~WebInputHandlerClient() { }
 };

Modified: trunk/Source/WebKit/chromium/ChangeLog (136420 => 136421)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-12-03 19:13:39 UTC (rev 136420)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-12-03 19:15:36 UTC (rev 136421)
@@ -1,3 +1,18 @@
+2012-12-03  Sami Kyostila  <skyos...@chromium.org>
+
+        [chromium] Tell WebInputHandlerClient when end of input is reached for current vsync period
+        https://bugs.webkit.org/show_bug.cgi?id=103648
+
+        Reviewed by James Robinson.
+
+        Let the WebInputHandlerClient know when we've received the final input event
+        for the current vsync period.
+
+        Test: WebCompositorInputHandlerImplTest.lastInputEventForVSync
+
+        * src/WebCompositorInputHandlerImpl.cpp:
+        (WebKit::WebCompositorInputHandlerImpl::handleInputEvent):
+
 2012-12-03  Stephen White  <senorbla...@chromium.org>
 
         [chromium] Turn on the new Skia mask blur algorithm.

Modified: trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp (136420 => 136421)


--- trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp	2012-12-03 19:13:39 UTC (rev 136420)
+++ trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp	2012-12-03 19:15:36 UTC (rev 136421)
@@ -110,6 +110,8 @@
         m_client->didNotHandleInputEvent(false /* sendToWidget */);
         break;
     }
+    if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync)
+        m_inputHandlerClient->didReceiveLastInputEventForVSync();
 }
 
 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::handleInputEventInternal(const WebInputEvent& event)

Modified: trunk/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp (136420 => 136421)


--- trunk/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp	2012-12-03 19:13:39 UTC (rev 136420)
+++ trunk/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp	2012-12-03 19:15:36 UTC (rev 136421)
@@ -62,6 +62,8 @@
     MOCK_METHOD2(scrollByIfPossible, bool(WebPoint, WebSize));
     MOCK_METHOD0(scrollEnd, void());
 
+    MOCK_METHOD0(didReceiveLastInputEventForVSync, void());
+
 private:
     virtual void startPageScaleAnimation(WebSize targetPosition,
                                          bool anchorPoint,
@@ -745,4 +747,15 @@
     m_inputHandler->handleInputEvent(gesture);
 }
 
+TEST_F(WebCompositorInputHandlerImplTest, lastInputEventForVSync)
+{
+    m_expectedDisposition = DidNotHandle;
+    VERIFY_AND_RESET_MOCKS();
+
+    gesture.type = WebInputEvent::GestureFlingCancel;
+    gesture.modifiers |= WebInputEvent::IsLastInputEventForCurrentVSync;
+    EXPECT_CALL(m_mockInputHandlerClient, didReceiveLastInputEventForVSync());
+    m_inputHandler->handleInputEvent(gesture);
 }
+
+}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to