Remote tile layers shouldn't be UIViews
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 09:12:03 +0000 (09:12 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 09:12:03 +0000 (09:12 +0000)
commitaa23f2ecda2810472cd46b8eb5bbdf3270b1751f
treed189432149dc829f5246e351903b3eb25eca43d4
parent66c7ebe33092a1a64b30c224e41ee824958ad083
Remote tile layers shouldn't be UIViews
https://bugs.webkit.org/show_bug.cgi?id=191953

Reviewed by Tim Horton.

They don't need any UIView functionality, nor do they ever have UIView descendants.
We can use lighter weight objects.

* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h:
* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):
(WebKit::RemoteLayerTreePropertyApplier::updateChildren):

Factor to a function shared between platforms.
Support having both views and plain layers in the same tree.
Assert that all siblings are of the same type and that we don't attempt to add views to layers.

(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToUIView):
* UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::makeNode):

Use new plain layer on Mac too.

* UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
(-[WKPlainRemoteLayer description]):

Add a CALayer subclass so we can have a description, similar to WKCompositingView and pals.

(WebKit::RemoteLayerTreeNode::createWithPlainLayer):
(WebKit::RemoteLayerTreeNode::detachFromParent):

Support having null view.

(WebKit::RemoteLayerTreeNode::appendLayerDescription):

Helper for layer descriptions.

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::makeNode):

Construct plain layers for tiles.

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(-[WKCompositingView description]):
(-[WKUIRemoteView description]):
(-[WKBackdropView description]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h
Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm