Title: [112059] trunk/Source
Revision
112059
Author
[email protected]
Date
2012-03-26 01:02:36 -0700 (Mon, 26 Mar 2012)

Log Message

[chromium] Route willBeginFrame from compositor to WebWidget
https://bugs.webkit.org/show_bug.cgi?id=82171

Reviewed by Darin Fisher.

Source/Platform:

* chromium/public/WebLayerTreeViewClient.h:
(WebLayerTreeViewClient):
(WebKit::WebLayerTreeViewClient::willBeginFrame):

Source/WebCore:

* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHostClient):
(WebCore::CCLayerTreeHost::willBeginFrame):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::beginFrame):

Source/WebKit/chromium:

* public/WebWidgetClient.h:
(WebWidgetClient):
(WebKit::WebWidgetClient::willBeginCompositorFrame):
* src/WebLayerTreeViewImpl.cpp:
(WebKit::WebLayerTreeViewImpl::willBeginFrame):
(WebKit):
* src/WebLayerTreeViewImpl.h:
(WebLayerTreeViewImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::willBeginFrame):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):
* tests/CCLayerTreeHostTest.cpp:
(WTF::MockLayerTreeHostClient::willBeginFrame):
(MockLayerTreeHostClient):
* tests/FakeCCLayerTreeHostClient.h:
(WebCore::FakeCCLayerTreeHostClient::willBeginFrame):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (112058 => 112059)


--- trunk/Source/Platform/ChangeLog	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/Platform/ChangeLog	2012-03-26 08:02:36 UTC (rev 112059)
@@ -1,3 +1,14 @@
+2012-03-25  Nat Duca  <[email protected]>
+
+        [chromium] Route willBeginFrame from compositor to WebWidget
+        https://bugs.webkit.org/show_bug.cgi?id=82171
+
+        Reviewed by Darin Fisher.
+
+        * chromium/public/WebLayerTreeViewClient.h:
+        (WebLayerTreeViewClient):
+        (WebKit::WebLayerTreeViewClient::willBeginFrame):
+
 2012-03-23  Tony Chang  <[email protected]>
 
         [chromium] rename newwtf target back to wtf

Modified: trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h (112058 => 112059)


--- trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h	2012-03-26 08:02:36 UTC (rev 112059)
@@ -33,6 +33,13 @@
 
 class WebLayerTreeViewClient {
 public:
+    // Indicates to the embedder that the compositor is about to begin a
+    // frame. This is is a signal to flow control mechanisms that a frame is
+    // beginning. This call will be followed by updateAnimations and then
+    // layout, which should be used for actual animation or tree manipulation
+    // tasks.  FIXME: make pure virtual once upstream deps are satisfied.
+    virtual void willBeginFrame() { }
+
     // Updates animation and layout. These are called before the compositing
     // pass so that layers can be updated at the given frame time.
     virtual void updateAnimations(double frameBeginTime) = 0;

Modified: trunk/Source/WebCore/ChangeLog (112058 => 112059)


--- trunk/Source/WebCore/ChangeLog	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebCore/ChangeLog	2012-03-26 08:02:36 UTC (rev 112059)
@@ -1,3 +1,16 @@
+2012-03-25  Nat Duca  <[email protected]>
+
+        [chromium] Route willBeginFrame from compositor to WebWidget
+        https://bugs.webkit.org/show_bug.cgi?id=82171
+
+        Reviewed by Darin Fisher.
+
+        * platform/graphics/chromium/cc/CCLayerTreeHost.h:
+        (CCLayerTreeHostClient):
+        (WebCore::CCLayerTreeHost::willBeginFrame):
+        * platform/graphics/chromium/cc/CCThreadProxy.cpp:
+        (WebCore::CCThreadProxy::beginFrame):
+
 2012-03-25  Hayato Ito  <[email protected]>
 
         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h (112058 => 112059)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2012-03-26 08:02:36 UTC (rev 112059)
@@ -52,6 +52,7 @@
 
 class CCLayerTreeHostClient {
 public:
+    virtual void willBeginFrame() = 0;
     virtual void updateAnimations(double frameBeginTime) = 0;
     virtual void layout() = 0;
     virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale) = 0;
@@ -129,6 +130,7 @@
     static bool anyLayerTreeHostInstanceExists();
 
     // CCLayerTreeHost interface to CCProxy.
+    void willBeginFrame() { m_client->willBeginFrame(); }
     void updateAnimations(double wallClockTime);
     void layout();
     void beginCommitOnImplThread(CCLayerTreeHostImpl*);

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp (112058 => 112059)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp	2012-03-26 08:02:36 UTC (rev 112059)
@@ -440,6 +440,8 @@
     // Re-do the commit flow so that we don't send the scrollInfo on the BFAC message.
     m_layerTreeHost->applyScrollAndScale(*request->scrollInfo);
 
+    m_layerTreeHost->willBeginFrame();
+
     // FIXME: recreate the context if it was requested by the impl thread.
     m_layerTreeHost->updateAnimations(request->frameBeginTime);
     m_layerTreeHost->layout();

Modified: trunk/Source/WebKit/chromium/ChangeLog (112058 => 112059)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-26 08:02:36 UTC (rev 112059)
@@ -1,3 +1,29 @@
+2012-03-25  Nat Duca  <[email protected]>
+
+        [chromium] Route willBeginFrame from compositor to WebWidget
+        https://bugs.webkit.org/show_bug.cgi?id=82171
+
+        Reviewed by Darin Fisher.
+
+        * public/WebWidgetClient.h:
+        (WebWidgetClient):
+        (WebKit::WebWidgetClient::willBeginCompositorFrame):
+        * src/WebLayerTreeViewImpl.cpp:
+        (WebKit::WebLayerTreeViewImpl::willBeginFrame):
+        (WebKit):
+        * src/WebLayerTreeViewImpl.h:
+        (WebLayerTreeViewImpl):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::willBeginFrame):
+        (WebKit):
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+        * tests/CCLayerTreeHostTest.cpp:
+        (WTF::MockLayerTreeHostClient::willBeginFrame):
+        (MockLayerTreeHostClient):
+        * tests/FakeCCLayerTreeHostClient.h:
+        (WebCore::FakeCCLayerTreeHostClient::willBeginFrame):
+
 2012-03-25  Dana Jansens  <[email protected]>
 
         [chromium] Layers with animating transforms should prepaint even if they are not visible yet

Modified: trunk/Source/WebKit/chromium/public/WebWidgetClient.h (112058 => 112059)


--- trunk/Source/WebKit/chromium/public/WebWidgetClient.h	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebKit/chromium/public/WebWidgetClient.h	2012-03-26 08:02:36 UTC (rev 112059)
@@ -64,6 +64,13 @@
     virtual void didActivateCompositor(int inputHandlerIdentifier) { }
     virtual void didDeactivateCompositor() { }
 
+    // Indicates to the embedder that the compositor is about to begin a
+    // frame. This is primarily to signal to flow control mechanisms that a
+    // frame is beginning, not to perform actual painting work.
+    //
+    // FIXME: Make pure virtual once upstream deps are satisfied.
+    virtual void willBeginCompositorFrame() { }
+
     // Called for compositing mode when the draw commands for a WebKit-side
     // frame have been issued.
     virtual void didCommitAndDrawCompositorFrame() { }

Modified: trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp (112058 => 112059)


--- trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp	2012-03-26 08:02:36 UTC (rev 112059)
@@ -60,6 +60,12 @@
 {
 }
 
+void WebLayerTreeViewImpl::willBeginFrame()
+{
+    if (m_client)
+        m_client->willBeginFrame();
+}
+
 void WebLayerTreeViewImpl::updateAnimations(double frameBeginTime)
 {
     if (m_client)

Modified: trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h (112058 => 112059)


--- trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h	2012-03-26 08:02:36 UTC (rev 112059)
@@ -41,6 +41,7 @@
 private:
     WebLayerTreeViewImpl(WebLayerTreeViewClient*, const WebLayerTreeView::Settings&);
     virtual ~WebLayerTreeViewImpl();
+    virtual void willBeginFrame();
     virtual void updateAnimations(double frameBeginTime);
     virtual void layout();
     virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale);

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (112058 => 112059)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-03-26 08:02:36 UTC (rev 112059)
@@ -1349,6 +1349,11 @@
 #endif
 }
 
+void WebViewImpl::willBeginFrame()
+{
+    m_client->willBeginCompositorFrame();
+}
+
 void WebViewImpl::updateAnimations(double frameBeginTime)
 {
 #if ENABLE(REQUEST_ANIMATION_FRAME)

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (112058 => 112059)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-03-26 08:02:36 UTC (rev 112059)
@@ -254,6 +254,7 @@
     virtual void removePageOverlay(WebPageOverlay*);
 
     // WebLayerTreeViewClient
+    virtual void willBeginFrame();
     virtual void updateAnimations(double frameBeginTime);
     virtual void applyScrollAndScale(const WebSize&, float);
     virtual WebGraphicsContext3D* createContext3D();

Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (112058 => 112059)


--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2012-03-26 08:02:36 UTC (rev 112059)
@@ -220,6 +220,10 @@
         return adoptPtr(new MockLayerTreeHostClient(testHooks));
     }
 
+    virtual void willBeginFrame()
+    {
+    }
+
     virtual void updateAnimations(double monotonicTime)
     {
         m_testHooks->updateAnimations(monotonicTime);

Modified: trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h (112058 => 112059)


--- trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h	2012-03-26 07:34:10 UTC (rev 112058)
+++ trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h	2012-03-26 08:02:36 UTC (rev 112059)
@@ -34,6 +34,7 @@
 
 class FakeCCLayerTreeHostClient : public CCLayerTreeHostClient {
 public:
+    virtual void willBeginFrame() { }
     virtual void updateAnimations(double frameBeginTime) { }
     virtual void layout() { }
     virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale) { }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to