Changeset 112059 in webkit


Ignore:
Timestamp:
Mar 26, 2012 1:02:36 AM (12 years ago)
Author:
nduca@chromium.org
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):

Location:
trunk/Source
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/Platform/ChangeLog

    r111887 r112059  
     12012-03-25  Nat Duca  <nduca@chromium.org>
     2
     3        [chromium] Route willBeginFrame from compositor to WebWidget
     4        https://bugs.webkit.org/show_bug.cgi?id=82171
     5
     6        Reviewed by Darin Fisher.
     7
     8        * chromium/public/WebLayerTreeViewClient.h:
     9        (WebLayerTreeViewClient):
     10        (WebKit::WebLayerTreeViewClient::willBeginFrame):
     11
    1122012-03-23  Tony Chang  <tony@chromium.org>
    213
  • trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h

    r108883 r112059  
    3434class WebLayerTreeViewClient {
    3535public:
     36    // Indicates to the embedder that the compositor is about to begin a
     37    // frame. This is is a signal to flow control mechanisms that a frame is
     38    // beginning. This call will be followed by updateAnimations and then
     39    // layout, which should be used for actual animation or tree manipulation
     40    // tasks.  FIXME: make pure virtual once upstream deps are satisfied.
     41    virtual void willBeginFrame() { }
     42
    3643    // Updates animation and layout. These are called before the compositing
    3744    // pass so that layers can be updated at the given frame time.
  • trunk/Source/WebCore/ChangeLog

    r112055 r112059  
     12012-03-25  Nat Duca  <nduca@chromium.org>
     2
     3        [chromium] Route willBeginFrame from compositor to WebWidget
     4        https://bugs.webkit.org/show_bug.cgi?id=82171
     5
     6        Reviewed by Darin Fisher.
     7
     8        * platform/graphics/chromium/cc/CCLayerTreeHost.h:
     9        (CCLayerTreeHostClient):
     10        (WebCore::CCLayerTreeHost::willBeginFrame):
     11        * platform/graphics/chromium/cc/CCThreadProxy.cpp:
     12        (WebCore::CCThreadProxy::beginFrame):
     13
    1142012-03-25  Hayato Ito  <hayato@chromium.org>
    215
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h

    r111777 r112059  
    5353class CCLayerTreeHostClient {
    5454public:
     55    virtual void willBeginFrame() = 0;
    5556    virtual void updateAnimations(double frameBeginTime) = 0;
    5657    virtual void layout() = 0;
     
    130131
    131132    // CCLayerTreeHost interface to CCProxy.
     133    void willBeginFrame() { m_client->willBeginFrame(); }
    132134    void updateAnimations(double wallClockTime);
    133135    void layout();
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp

    r111805 r112059  
    441441    m_layerTreeHost->applyScrollAndScale(*request->scrollInfo);
    442442
     443    m_layerTreeHost->willBeginFrame();
     444
    443445    // FIXME: recreate the context if it was requested by the impl thread.
    444446    m_layerTreeHost->updateAnimations(request->frameBeginTime);
  • trunk/Source/WebKit/chromium/ChangeLog

    r112049 r112059  
     12012-03-25  Nat Duca  <nduca@chromium.org>
     2
     3        [chromium] Route willBeginFrame from compositor to WebWidget
     4        https://bugs.webkit.org/show_bug.cgi?id=82171
     5
     6        Reviewed by Darin Fisher.
     7
     8        * public/WebWidgetClient.h:
     9        (WebWidgetClient):
     10        (WebKit::WebWidgetClient::willBeginCompositorFrame):
     11        * src/WebLayerTreeViewImpl.cpp:
     12        (WebKit::WebLayerTreeViewImpl::willBeginFrame):
     13        (WebKit):
     14        * src/WebLayerTreeViewImpl.h:
     15        (WebLayerTreeViewImpl):
     16        * src/WebViewImpl.cpp:
     17        (WebKit::WebViewImpl::willBeginFrame):
     18        (WebKit):
     19        * src/WebViewImpl.h:
     20        (WebViewImpl):
     21        * tests/CCLayerTreeHostTest.cpp:
     22        (WTF::MockLayerTreeHostClient::willBeginFrame):
     23        (MockLayerTreeHostClient):
     24        * tests/FakeCCLayerTreeHostClient.h:
     25        (WebCore::FakeCCLayerTreeHostClient::willBeginFrame):
     26
    1272012-03-25  Dana Jansens  <danakj@chromium.org>
    228
  • trunk/Source/WebKit/chromium/public/WebWidgetClient.h

    r111285 r112059  
    6464    virtual void didActivateCompositor(int inputHandlerIdentifier) { }
    6565    virtual void didDeactivateCompositor() { }
     66
     67    // Indicates to the embedder that the compositor is about to begin a
     68    // frame. This is primarily to signal to flow control mechanisms that a
     69    // frame is beginning, not to perform actual painting work.
     70    //
     71    // FIXME: Make pure virtual once upstream deps are satisfied.
     72    virtual void willBeginCompositorFrame() { }
    6673
    6774    // Called for compositing mode when the draw commands for a WebKit-side
  • trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp

    r109411 r112059  
    6161}
    6262
     63void WebLayerTreeViewImpl::willBeginFrame()
     64{
     65    if (m_client)
     66        m_client->willBeginFrame();
     67}
     68
    6369void WebLayerTreeViewImpl::updateAnimations(double frameBeginTime)
    6470{
  • trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h

    r109411 r112059  
    4242    WebLayerTreeViewImpl(WebLayerTreeViewClient*, const WebLayerTreeView::Settings&);
    4343    virtual ~WebLayerTreeViewImpl();
     44    virtual void willBeginFrame();
    4445    virtual void updateAnimations(double frameBeginTime);
    4546    virtual void layout();
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r111806 r112059  
    13501350}
    13511351
     1352void WebViewImpl::willBeginFrame()
     1353{
     1354    m_client->willBeginCompositorFrame();
     1355}
     1356
    13521357void WebViewImpl::updateAnimations(double frameBeginTime)
    13531358{
  • trunk/Source/WebKit/chromium/src/WebViewImpl.h

    r111182 r112059  
    255255
    256256    // WebLayerTreeViewClient
     257    virtual void willBeginFrame();
    257258    virtual void updateAnimations(double frameBeginTime);
    258259    virtual void applyScrollAndScale(const WebSize&, float);
  • trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp

    r111700 r112059  
    221221    }
    222222
     223    virtual void willBeginFrame()
     224    {
     225    }
     226
    223227    virtual void updateAnimations(double monotonicTime)
    224228    {
  • trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h

    r109411 r112059  
    3535class FakeCCLayerTreeHostClient : public CCLayerTreeHostClient {
    3636public:
     37    virtual void willBeginFrame() { }
    3738    virtual void updateAnimations(double frameBeginTime) { }
    3839    virtual void layout() { }
Note: See TracChangeset for help on using the changeset viewer.