Changeset 238549 in webkit
- Timestamp:
- Nov 27, 2018, 4:39:27 AM (8 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h (modified) (1 diff)
-
UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r238547 r238549 1 2018-11-27 Antti Koivisto <antti@apple.com> 2 3 Stop collecting related layers in RemoteLayerTreeHost::updateLayerTree 4 https://bugs.webkit.org/show_bug.cgi?id=192003 5 6 Reviewed by Tim Horton. 7 8 We can pass the node hash directly to RemoteLayerTreePropertyApplier. The collection step doesn't seem 9 to add anything except an extra hash lookup. 10 11 * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h: 12 * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: 13 (WebKit::RemoteLayerTreeHost::updateLayerTree): 14 15 Pass m_nodes directly. 16 Some random cleanups. 17 1 18 2018-11-27 Antti Koivisto <antti@apple.com> 2 19 -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h
r238547 r238549 36 36 class RemoteLayerTreePropertyApplier { 37 37 public: 38 using RelatedLayerMap = HashMap<WebCore::GraphicsLayer::PlatformLayerID, RemoteLayerTreeNode*>;38 using RelatedLayerMap = HashMap<WebCore::GraphicsLayer::PlatformLayerID, std::unique_ptr<RemoteLayerTreeNode>>; 39 39 static void applyProperties(RemoteLayerTreeNode&, RemoteLayerTreeHost*, const RemoteLayerTreeTransaction::LayerProperties&, const RelatedLayerMap&, RemoteLayerBackingStore::LayerContentsType); 40 40 static void applyPropertiesToLayer(CALayer *, RemoteLayerTreeHost*, const RemoteLayerTreeTransaction::LayerProperties&, RemoteLayerBackingStore::LayerContentsType); -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
r238547 r238549 83 83 } 84 84 85 typedef std::pair<GraphicsLayer::PlatformLayerID, GraphicsLayer::PlatformLayerID> LayerIDPair; 86 Vector<LayerIDPair> clonesToUpdate; 85 struct LayerAndClone { 86 GraphicsLayer::PlatformLayerID layerID; 87 GraphicsLayer::PlatformLayerID cloneLayerID; 88 }; 89 Vector<LayerAndClone> clonesToUpdate; 87 90 88 91 #if PLATFORM(MAC) || PLATFORM(IOSMAC) … … 100 103 ASSERT(node); 101 104 102 RemoteLayerTreePropertyApplier::RelatedLayerMap relatedLayers; 103 if (properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { 104 for (auto& child : properties.children) 105 relatedLayers.set(child, nodeForID(child)); 106 } 107 108 if (properties.changedProperties & RemoteLayerTreeTransaction::MaskLayerChanged && properties.maskLayerID) 109 relatedLayers.set(properties.maskLayerID, nodeForID(properties.maskLayerID)); 110 111 if (properties.changedProperties & RemoteLayerTreeTransaction::ClonedContentsChanged && properties.clonedLayerID) 112 clonesToUpdate.append(LayerIDPair(layerID, properties.clonedLayerID)); 105 if (properties.changedProperties.contains(RemoteLayerTreeTransaction::ClonedContentsChanged) && properties.clonedLayerID) 106 clonesToUpdate.append({ layerID, properties.clonedLayerID }); 107 108 RemoteLayerTreePropertyApplier::applyProperties(*node, this, properties, m_nodes, layerContentsType); 113 109 114 110 if (m_isDebugLayerTreeHost) { 115 RemoteLayerTreePropertyApplier::applyProperties(*node, this, properties, relatedLayers, layerContentsType); 116 117 if (properties.changedProperties & RemoteLayerTreeTransaction::BorderWidthChanged) 111 if (properties.changedProperties.contains(RemoteLayerTreeTransaction::BorderWidthChanged)) 118 112 node->layer().borderWidth = properties.borderWidth / indicatorScaleFactor; 119 113 node->layer().masksToBounds = false; 120 } else 121 RemoteLayerTreePropertyApplier::applyProperties(*node, this, properties, relatedLayers, layerContentsType); 114 } 122 115 } 123 116 124 for (const auto& layerPair : clonesToUpdate) { 125 auto* layer = layerForID(layerPair.first); 126 auto* clonedLayer = layerForID(layerPair.second); 127 layer.contents = clonedLayer.contents; 128 } 117 for (const auto& layerAndClone : clonesToUpdate) 118 layerForID(layerAndClone.layerID).contents = layerForID(layerAndClone.cloneLayerID).contents; 129 119 130 120 for (auto& destroyedLayer : transaction.destroyedLayers())
Note:
See TracChangeset
for help on using the changeset viewer.