Changeset 109521 in webkit


Ignore:
Timestamp:
Mar 2, 2012 12:11:42 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[chromium] Send didCommitAndDrawFrame after swap
https://bugs.webkit.org/show_bug.cgi?id=80052

Patch by John Bauman <jbauman@chromium.org> on 2012-03-02
Reviewed by James Robinson.

Sending didCommitAndDrawFrame before the swap was causing plugins to
redraw themselves between compositing and the swap, which reduces
opportunities for optimization.

  • platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:

(WebCore::CCSingleThreadProxy::compositeAndReadback):
(WebCore::CCSingleThreadProxy::compositeImmediately):
(WebCore::CCSingleThreadProxy::doComposite):
(WebCore):
(WebCore::CCSingleThreadProxy::didSwapFrame):

  • platform/graphics/chromium/cc/CCSingleThreadProxy.h:

(CCSingleThreadProxy):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109518 r109521  
     12012-03-02  John Bauman  <jbauman@chromium.org>
     2
     3        [chromium] Send didCommitAndDrawFrame after swap
     4        https://bugs.webkit.org/show_bug.cgi?id=80052
     5
     6        Reviewed by James Robinson.
     7
     8        Sending didCommitAndDrawFrame before the swap was causing plugins to
     9        redraw themselves between compositing and the swap, which reduces
     10        opportunities for optimization.
     11
     12        * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
     13        (WebCore::CCSingleThreadProxy::compositeAndReadback):
     14        (WebCore::CCSingleThreadProxy::compositeImmediately):
     15        (WebCore::CCSingleThreadProxy::doComposite):
     16        (WebCore):
     17        (WebCore::CCSingleThreadProxy::didSwapFrame):
     18        * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
     19        (CCSingleThreadProxy):
     20
    1212012-03-02  Raymond Toy  <rtoy@google.com>
    222
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp

    r109411 r109521  
    8181    m_layerTreeHostImpl->readback(pixels, rect);
    8282
     83    didSwapFrame();
     84
    8385    if (m_layerTreeHostImpl->isContextLost())
    8486        return false;
     
    267269        return;
    268270
    269     if (doComposite())
     271    if (doComposite()) {
    270272        m_layerTreeHostImpl->swapBuffers();
     273        didSwapFrame();
     274    }
    271275}
    272276
     
    298302    }
    299303
     304    return true;
     305}
     306
     307void CCSingleThreadProxy::didSwapFrame()
     308{
    300309    if (m_nextFrameIsNewlyCommittedFrame) {
    301310        m_nextFrameIsNewlyCommittedFrame = false;
    302311        m_layerTreeHost->didCommitAndDrawFrame();
    303312    }
    304 
    305     return true;
    306 }
    307 
    308 }
     313}
     314
     315}
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h

    r109411 r109521  
    7777    void doCommit();
    7878    bool doComposite();
     79    void didSwapFrame();
    7980
    8081    // Accessed on main thread only.
Note: See TracChangeset for help on using the changeset viewer.