Title: [88056] branches/safari-534-branch/Source/WebKit2

Diff

Modified: branches/safari-534-branch/Source/WebKit2/ChangeLog (88055 => 88056)


--- branches/safari-534-branch/Source/WebKit2/ChangeLog	2011-06-03 21:26:58 UTC (rev 88055)
+++ branches/safari-534-branch/Source/WebKit2/ChangeLog	2011-06-03 21:31:11 UTC (rev 88056)
@@ -1,3 +1,31 @@
+2011-06-03  Lucas Forschler  <lforsch...@apple.com>
+
+    Merged 87839.
+
+    2011-06-01  Jer Noble  <jer.no...@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.
+
 2011-06-02  Lucas Forschler  <lforsch...@apple.com>
 
     Merged 87945.

Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp (88055 => 88056)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp	2011-06-03 21:26:58 UTC (rev 88055)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp	2011-06-03 21:31:11 UTC (rev 88056)
@@ -94,6 +94,11 @@
     m_page->process()->send(Messages::WebFullScreenManager::BeginExitFullScreenAnimation(duration), m_page->pageID());
 }
 
+void WebFullScreenManagerProxy::disposeOfLayerClient()
+{
+    m_page->process()->send(Messages::WebFullScreenManager::DisposeOfLayerClient(), m_page->pageID());
+}
+
 void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, bool& supports)
 {
     if (withKeyboard)

Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h (88055 => 88056)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h	2011-06-03 21:26:58 UTC (rev 88055)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h	2011-06-03 21:31:11 UTC (rev 88056)
@@ -81,6 +81,7 @@
     void didExitFullScreen();
     void beginEnterFullScreenAnimation(float duration);
     void beginExitFullScreenAnimation(float duration);
+    void disposeOfLayerClient();
 
 private:
     WebFullScreenManagerProxy(WebPageProxy*);

Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (88055 => 88056)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm	2011-06-03 21:26:58 UTC (rev 88055)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm	2011-06-03 21:31:11 UTC (rev 88056)
@@ -410,6 +410,8 @@
     
     _layerHostingView = 0;
     NSEnableScreenUpdates();
+
+    [self _manager]->disposeOfLayerClient();
 }
 
 static void exitCompositedModeRepaintCompleted(WKErrorRef, void* context)

Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.h (88055 => 88056)


--- branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.h	2011-06-03 21:26:58 UTC (rev 88055)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.h	2011-06-03 21:31:11 UTC (rev 88056)
@@ -75,6 +75,7 @@
 
     virtual void beginEnterFullScreenAnimation(float duration) = 0;
     virtual void beginExitFullScreenAnimation(float duration) = 0;
+    virtual void disposeOfLayerClient() { }
     WebCore::IntRect getFullScreenRect();
 
     void didReceiveWebFullScreenManagerMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);

Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.messages.in (88055 => 88056)


--- branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.messages.in	2011-06-03 21:26:58 UTC (rev 88055)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.messages.in	2011-06-03 21:31:11 UTC (rev 88056)
@@ -28,5 +28,6 @@
     DidExitFullScreen()
     BeginEnterFullScreenAnimation(float duration)
     BeginExitFullScreenAnimation(float duration)
+    DisposeOfLayerClient()
 }
 #endif

Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.h (88055 => 88056)


--- branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.h	2011-06-03 21:26:58 UTC (rev 88055)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.h	2011-06-03 21:31:11 UTC (rev 88056)
@@ -52,6 +52,7 @@
 
     virtual void beginEnterFullScreenAnimation(float duration);
     virtual void beginExitFullScreenAnimation(float duration);
+    virtual void disposeOfLayerClient();
 
     void animateFullScreen(const CATransform3D& startTransform, const CATransform3D& endTransform, float duration, id listener);
     CATransform3D windowedCGTransform();

Modified: branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm (88055 => 88056)


--- branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm	2011-06-03 21:26:58 UTC (rev 88055)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm	2011-06-03 21:31:11 UTC (rev 88056)
@@ -193,6 +193,15 @@
     [[NSNotificationCenter defaultCenter] postNotificationName:@"WebKitLayerHostChanged" object:m_rootLayer->platformLayer() userInfo:nil];
 }
 
+void WebFullScreenManagerMac::disposeOfLayerClient()
+{
+    if (!m_remoteLayerClient)
+        return;
+    WKCARemoteLayerClientSetLayer(m_remoteLayerClient.get(), 0);
+    WKCARemoteLayerClientInvalidate(m_remoteLayerClient.get());
+    m_remoteLayerClient = nullptr;
+}
+
 void WebFullScreenManagerMac::beginEnterFullScreenAnimation(float duration)
 {
     ASSERT(m_element);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to