void PlatformCALayerRemote::recursiveBuildTransaction(RemoteLayerTreeTransaction& transaction) { if (m_properties.backingStore.display()) m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged); if (m_properties.changedProperties != RemoteLayerTreeTransaction::NoChange) { if (m_properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { m_properties.children.clear(); for (auto layer : m_children) m_properties.children.append(layer->layerID()); } if (m_layerType == LayerTypeCustom) { RemoteLayerTreePropertyApplier::applyPropertiesToLayer(platformLayer(), m_properties, RemoteLayerTreePropertyApplier::RelatedLayerMap()); m_properties.changedProperties = RemoteLayerTreeTransaction::NoChange; return; } transaction.layerPropertiesChanged(this, m_properties); m_properties.changedProperties = RemoteLayerTreeTransaction::NoChange; } for (size_t i = 0; i < m_children.size(); ++i) { PlatformCALayerRemote* child = toPlatformCALayerRemote(m_children[i].get()); ASSERT(child->superlayer() == this); child->recursiveBuildTransaction(transaction); } if (m_maskLayer) m_maskLayer->recursiveBuildTransaction(transaction); }
void WebVideoFullscreenManager::willCommitLayerTree(RemoteLayerTreeTransaction& transaction) { if (m_sendUnparentVideoLayerTransaction) { transaction.addVideoLayerIDPendingFullscreen(m_platformCALayer->layerID()); m_sendUnparentVideoLayerTransaction = false; } }
void PlatformCALayerRemote::recursiveBuildTransaction(RemoteLayerTreeTransaction& transaction) { if (m_properties.backingStore.display()) m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged); if (m_properties.changedProperties != RemoteLayerTreeTransaction::NoChange) { if (m_properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { m_properties.children.clear(); for (auto layer : m_children) m_properties.children.append(toPlatformCALayerRemote(layer.get())->layerID()); } transaction.layerPropertiesChanged(this, m_properties); m_properties.changedProperties = RemoteLayerTreeTransaction::NoChange; } for (size_t i = 0; i < m_children.size(); ++i) { PlatformCALayerRemote* child = toPlatformCALayerRemote(m_children[i].get()); ASSERT(child->superlayer() == this); child->recursiveBuildTransaction(transaction); } }
void PlatformCALayerRemote::recursiveBuildTransaction(RemoteLayerTreeContext& context, RemoteLayerTreeTransaction& transaction) { ASSERT(!m_properties.backingStore || owner()); ASSERT_WITH_SECURITY_IMPLICATION(&context == m_context); if (m_properties.backingStore && (!owner() || !owner()->platformCALayerDrawsContent())) { m_properties.backingStore = nullptr; m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged); } if (m_properties.backingStore && m_properties.backingStoreAttached && m_properties.backingStore->display()) m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged); if (m_properties.changedProperties != RemoteLayerTreeTransaction::NoChange) { if (m_properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) { m_properties.children.resize(m_children.size()); for (size_t i = 0; i < m_children.size(); ++i) m_properties.children[i] = m_children[i]->layerID(); } if (isPlatformCALayerRemoteCustom()) { RemoteLayerTreePropertyApplier::applyProperties(platformLayer(), nullptr, m_properties, RemoteLayerTreePropertyApplier::RelatedLayerMap()); didCommit(); return; } transaction.layerPropertiesChanged(*this); } for (size_t i = 0; i < m_children.size(); ++i) { PlatformCALayerRemote& child = downcast<PlatformCALayerRemote>(*m_children[i]); ASSERT(child.superlayer() == this); child.recursiveBuildTransaction(context, transaction); } if (m_maskLayer) m_maskLayer->recursiveBuildTransaction(context, transaction); }