Changeset 87839 in webkit


Ignore:
Timestamp:
Jun 1, 2011 1:14:36 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-06-01 Jer Noble <jer.noble@apple.com>

Reviewed by Maciej Stachowiak.

Flash of old video frame at the end of full screen transition
https://bugs.webkit.org/show_bug.cgi?id=61752

Add a new method and message, DisposeOfLayerClient, which will invalidate and release
the WKRemoteLayerClient used during the full-screen animation. This ensures that
the root layer used for the full-screen animation will be in a clean state at the start
of the next transition.

  • UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::disposeOfLayerClient): Added.
  • UIProcess/WebFullScreenManagerProxy.h:
  • UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]): Call disposeOfLayerClient.
  • WebProcess/FullScreen/WebFullScreenManager.h: (WebKit::WebFullScreenManager::disposeOfLayerClient): Added.
  • WebProcess/FullScreen/WebFullScreenManager.messages.in: Added DisposeOfLayerClient.
  • WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
  • WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::disposeOfLayerClient): Added, invalidates and clears m_rootLayerClient.
Location:
trunk/Source/WebKit2
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r87834 r87839  
     12011-06-01  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Flash of old video frame at the end of full screen transition
     6        https://bugs.webkit.org/show_bug.cgi?id=61752
     7
     8        Add a new method and message, DisposeOfLayerClient, which will invalidate and release
     9        the WKRemoteLayerClient used during the full-screen animation.  This ensures that
     10        the root layer used for the full-screen animation will be in a clean state at the start
     11        of the next transition.
     12
     13        * UIProcess/WebFullScreenManagerProxy.cpp:
     14        (WebKit::WebFullScreenManagerProxy::disposeOfLayerClient): Added.
     15        * UIProcess/WebFullScreenManagerProxy.h:
     16        * UIProcess/mac/WKFullScreenWindowController.mm:
     17        (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]): Call disposeOfLayerClient.
     18        * WebProcess/FullScreen/WebFullScreenManager.h:
     19        (WebKit::WebFullScreenManager::disposeOfLayerClient): Added.
     20        * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added DisposeOfLayerClient.
     21        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
     22        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
     23        (WebKit::WebFullScreenManagerMac::disposeOfLayerClient): Added, invalidates and clears m_rootLayerClient.
     24
    1252011-06-01  Adam Roben  <aroben@apple.com>
    226
  • trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp

    r86992 r87839  
    9595}
    9696
     97void WebFullScreenManagerProxy::disposeOfLayerClient()
     98{
     99    m_page->process()->send(Messages::WebFullScreenManager::DisposeOfLayerClient(), m_page->pageID());
     100}
     101
    97102void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, bool& supports)
    98103{
  • trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h

    r86812 r87839  
    8282    void beginEnterFullScreenAnimation(float duration);
    8383    void beginExitFullScreenAnimation(float duration);
     84    void disposeOfLayerClient();
    8485
    8586private:
  • trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

    r87656 r87839  
    423423    NSEnableScreenUpdates();
    424424
     425    [self _manager]->disposeOfLayerClient();
    425426    _isExitingAcceleratedCompositingMode = NO;
    426427    [self release]; // Balanced by retain in exitAcceleratedCompositingMode above.
  • trunk/Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.h

    r84206 r87839  
    7676    virtual void beginEnterFullScreenAnimation(float duration) = 0;
    7777    virtual void beginExitFullScreenAnimation(float duration) = 0;
     78    virtual void disposeOfLayerClient() { }
    7879    WebCore::IntRect getFullScreenRect();
    7980
  • trunk/Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.messages.in

    r80922 r87839  
    2929    BeginEnterFullScreenAnimation(float duration)
    3030    BeginExitFullScreenAnimation(float duration)
     31    DisposeOfLayerClient()
    3132}
    3233#endif
  • trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.h

    r87456 r87839  
    5353    virtual void beginEnterFullScreenAnimation(float duration);
    5454    virtual void beginExitFullScreenAnimation(float duration);
     55    virtual void disposeOfLayerClient();
    5556
    5657    void animateFullScreen(const CATransform3D& startTransform, const CATransform3D& endTransform, float duration, id listener);
  • trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm

    r87768 r87839  
    194194}
    195195
     196void WebFullScreenManagerMac::disposeOfLayerClient()
     197{
     198    if (!m_remoteLayerClient)
     199        return;
     200    WKCARemoteLayerClientSetLayer(m_remoteLayerClient.get(), 0);
     201    WKCARemoteLayerClientInvalidate(m_remoteLayerClient.get());
     202    m_remoteLayerClient = nullptr;
     203}
     204
    196205void WebFullScreenManagerMac::beginEnterFullScreenAnimation(float duration)
    197206{
Note: See TracChangeset for help on using the changeset viewer.