Make UI-side compositing on macOS a bit more usable
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Mar 2017 21:57:08 +0000 (21:57 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Mar 2017 21:57:08 +0000 (21:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170073

Reviewed by Tim Horton.

Mach port as layer contents doesn't work on macOS, so don't use it there.

Also remove two assertions that hit with UI-side compositing in MiniBrowser.

* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::createFence):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::requestScroll):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214379 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/DrawingAreaProxy.cpp
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm

index fdf5163..3b42e1a 100644 (file)
@@ -1,3 +1,21 @@
+2017-03-24  Simon Fraser  <simon.fraser@apple.com>
+
+        Make UI-side compositing on macOS a bit more usable
+        https://bugs.webkit.org/show_bug.cgi?id=170073
+
+        Reviewed by Tim Horton.
+        
+        Mach port as layer contents doesn't work on macOS, so don't use it there.
+
+        Also remove two assertions that hit with UI-side compositing in MiniBrowser.
+
+        * UIProcess/DrawingAreaProxy.cpp:
+        (WebKit::DrawingAreaProxy::createFence):
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::requestScroll):
+        * UIProcess/mac/RemoteLayerTreeHost.mm:
+        (WebKit::RemoteLayerTreeHost::updateLayerTree):
+
 2017-03-24  Alex Christensen  <achristensen@webkit.org>
 
         Fix assertions after r214358.
index a5f75f0..8960da3 100644 (file)
@@ -70,7 +70,6 @@ bool DrawingAreaProxy::setSize(const IntSize& size, const IntSize& layerPosition
 #if PLATFORM(COCOA)
 MachSendRight DrawingAreaProxy::createFence()
 {
-    ASSERT_NOT_REACHED();
     return MachSendRight();
 }
 #endif
index ec3d025..dd96089 100644 (file)
@@ -123,7 +123,6 @@ void PageClientImpl::setViewNeedsDisplay(const WebCore::Region&)
 
 void PageClientImpl::requestScroll(const FloatPoint& scrollPosition, const IntPoint& scrollOrigin, bool isProgrammaticScroll)
 {
-    ASSERT_NOT_REACHED();
 }
 
 WebCore::FloatPoint PageClientImpl::viewScrollPosition()
index e29881b..71498b4 100644 (file)
@@ -87,7 +87,12 @@ bool RemoteLayerTreeHost::updateLayerTree(const RemoteLayerTreeTransaction& tran
     typedef std::pair<GraphicsLayer::PlatformLayerID, GraphicsLayer::PlatformLayerID> LayerIDPair;
     Vector<LayerIDPair> clonesToUpdate;
 
+#if PLATFORM(MAC)
+    // Can't use the iOS code on macOS yet: rdar://problem/31247730
+    auto layerContentsType = RemoteLayerBackingStore::LayerContentsType::IOSurface;
+#else
     auto layerContentsType = m_drawingArea.hasDebugIndicator() ? RemoteLayerBackingStore::LayerContentsType::IOSurface : RemoteLayerBackingStore::LayerContentsType::CAMachPort;
+#endif
     
     for (auto& changedLayer : transaction.changedLayerProperties()) {
         auto layerID = changedLayer.key;