Title: [200514] trunk/Source/WebKit2
Revision
200514
Author
[email protected]
Date
2016-05-06 11:17:24 -0700 (Fri, 06 May 2016)

Log Message

Create a fence in WebVideoFullscreenManagerProxy::setVideoLayerFrame() to pass to the web process
https://bugs.webkit.org/show_bug.cgi?id=157409

Reviewed by Tim Horton.

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
Create a fence by calling DrawingAreaProxy::createFence() and pass it when sending the
WebVideoFullscreenManager::SetVideoLayerFrameFenced message.

* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::createFence):
Stub implementation. Assert not to be reached here since it's only implemented on Mac so far.
* UIProcess/DrawingAreaProxy.h:

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
Renamed from createFenceForGeometryUpdate() since we are using it for more than just updating geometry.
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
Update due to method rename.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (200513 => 200514)


--- trunk/Source/WebKit2/ChangeLog	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/ChangeLog	2016-05-06 18:17:24 UTC (rev 200514)
@@ -1,3 +1,27 @@
+2016-05-05  Ada Chan  <[email protected]>
+
+        Create a fence in WebVideoFullscreenManagerProxy::setVideoLayerFrame() to pass to the web process
+        https://bugs.webkit.org/show_bug.cgi?id=157409
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
+        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
+        Create a fence by calling DrawingAreaProxy::createFence() and pass it when sending the
+        WebVideoFullscreenManager::SetVideoLayerFrameFenced message.
+
+        * UIProcess/DrawingAreaProxy.cpp:
+        (WebKit::DrawingAreaProxy::createFence):
+        Stub implementation. Assert not to be reached here since it's only implemented on Mac so far.
+        * UIProcess/DrawingAreaProxy.h:
+
+        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
+        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+        (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
+        Renamed from createFenceForGeometryUpdate() since we are using it for more than just updating geometry.
+        (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
+        Update due to method rename.
+
 2016-05-05  Brady Eidson  <[email protected]>
 
         Modern IDB (Workers): Get everything to the right threads.

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm (200513 => 200514)


--- trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm	2016-05-06 18:17:24 UTC (rev 200514)
@@ -34,6 +34,7 @@
 #import "WebVideoFullscreenManagerMessages.h"
 #import "WebVideoFullscreenManagerProxyMessages.h"
 #import <QuartzCore/CoreAnimation.h>
+#import <WebCore/MachSendRight.h>
 #import <WebCore/QuartzCoreSPI.h>
 #import <WebCore/TimeRanges.h>
 #import <WebKitSystemInterface.h>
@@ -449,7 +450,10 @@
 #if PLATFORM(IOS)
         mach_port_name_t fencePort = [UIWindow _synchronizeDrawingAcrossProcesses];
 #else
-        mach_port_name_t fencePort = 0;
+        MachSendRight fenceSendRight;
+        if (DrawingAreaProxy* drawingArea = m_page->drawingArea())
+            fenceSendRight = drawingArea->createFence();
+        mach_port_name_t fencePort = fenceSendRight.leakSendRight();
 #endif
 
         m_page->send(Messages::WebVideoFullscreenManager::SetVideoLayerFrameFenced(contextId, frame, IPC::Attachment(fencePort, MACH_MSG_TYPE_MOVE_SEND)), m_page->pageID());

Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (200513 => 200514)


--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp	2016-05-06 18:17:24 UTC (rev 200514)
@@ -31,6 +31,10 @@
 #include "WebPageProxy.h"
 #include "WebProcessProxy.h"
 
+#if PLATFORM(COCOA)
+#include <WebCore/MachSendRight.h>
+#endif
+
 using namespace WebCore;
 
 namespace WebKit {
@@ -62,6 +66,14 @@
     sizeDidChange();
 }
 
+#if PLATFORM(COCOA)
+MachSendRight DrawingAreaProxy::createFence()
+{
+    ASSERT_NOT_REACHED();
+    return MachSendRight();
+}
+#endif
+
 #if PLATFORM(MAC)
 void DrawingAreaProxy::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
 {

Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (200513 => 200514)


--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h	2016-05-06 18:17:24 UTC (rev 200514)
@@ -39,6 +39,12 @@
 #include <wtf/RunLoop.h>
 #include <wtf/TypeCasts.h>
 
+#if PLATFORM(COCOA)
+namespace WebCore {
+class MachSendRight;
+}
+#endif
+
 namespace WebKit {
 
 class LayerTreeContext;
@@ -97,6 +103,10 @@
 
     virtual void willSendUpdateGeometry() { }
 
+#if PLATFORM(COCOA)
+    virtual WebCore::MachSendRight createFence();
+#endif
+
 protected:
     explicit DrawingAreaProxy(DrawingAreaType, WebPageProxy&);
 

Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h (200513 => 200514)


--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h	2016-05-06 18:17:24 UTC (rev 200514)
@@ -57,12 +57,13 @@
 
     void willSendUpdateGeometry() override;
 
+    WebCore::MachSendRight createFence() override;
+
     // Message handlers.
     void didUpdateGeometry() override;
     void intrinsicContentSizeDidChange(const WebCore::IntSize&) override;
 
     void sendUpdateGeometry();
-    WebCore::MachSendRight createFenceForGeometryUpdate();
 
     // Whether we're waiting for a DidUpdateGeometry message from the web process.
     bool m_isWaitingForDidUpdateGeometry;

Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (200513 => 200514)


--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm	2016-05-06 18:17:24 UTC (rev 200514)
@@ -150,7 +150,7 @@
     m_isWaitingForDidUpdateGeometry = true;
 }
 
-MachSendRight TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate()
+MachSendRight TiledCoreAnimationDrawingAreaProxy::createFence()
 {
 #if HAVE(COREANIMATION_FENCES)
     if (!m_webPageProxy.isValid())
@@ -192,7 +192,7 @@
     ASSERT(!m_isWaitingForDidUpdateGeometry);
 
     willSendUpdateGeometry();
-    m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition, true, createFenceForGeometryUpdate()), m_webPageProxy.pageID());
+    m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition, true, createFence()), m_webPageProxy.pageID());
 }
 
 void TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom(double scale, FloatPoint origin)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to