void WebGraphicsLayer::syncCompositingStateForThisLayerOnly() { if (!m_layerTreeTileClient) m_layerTreeTileClient = layerTreeTileClient(); updateContentBuffers(); if (!m_modified) return; m_layerInfo.name = name(); m_layerInfo.anchorPoint = anchorPoint(); m_layerInfo.backfaceVisible = backfaceVisibility(); m_layerInfo.childrenTransform = childrenTransform(); m_layerInfo.contentsOpaque = contentsOpaque(); m_layerInfo.contentsRect = contentsRect(); m_layerInfo.drawsContent = drawsContent(); m_layerInfo.mask = toWebLayerID(maskLayer()); m_layerInfo.masksToBounds = masksToBounds(); m_layerInfo.opacity = opacity(); m_layerInfo.parent = toWebLayerID(parent()); m_layerInfo.pos = position(); m_layerInfo.preserves3D = preserves3D(); m_layerInfo.replica = toWebLayerID(replicaLayer()); m_layerInfo.size = size(); m_layerInfo.transform = transform(); m_contentNeedsDisplay = false; m_layerInfo.children.clear(); for (size_t i = 0; i < children().size(); ++i) m_layerInfo.children.append(toWebLayerID(children()[i])); ASSERT(m_layerTreeTileClient); if (m_layerInfo.imageIsUpdated && m_image && !m_layerInfo.imageBackingStoreID) m_layerInfo.imageBackingStoreID = m_layerTreeTileClient->adoptImageBackingStore(m_image.get()); m_layerTreeTileClient->didSyncCompositingStateForLayer(m_layerInfo); m_modified = false; m_layerInfo.imageIsUpdated = false; if (m_hasPendingAnimations) notifyAnimationStarted(WTF::currentTime()); m_layerInfo.animations.clear(); m_hasPendingAnimations = false; }
void WebGraphicsLayer::syncChildren() { if (!m_shouldSyncChildren) return; m_shouldSyncChildren = false; Vector<WebLayerID> childIDs; for (size_t i = 0; i < children().size(); ++i) childIDs.append(toWebLayerID(children()[i])); m_webGraphicsLayerClient->syncLayerChildren(m_id, childIDs); }
void WebGraphicsLayer::syncLayerState() { if (!m_shouldSyncLayerState) return; m_shouldSyncLayerState = false; m_layerInfo.anchorPoint = anchorPoint(); m_layerInfo.backfaceVisible = backfaceVisibility(); m_layerInfo.childrenTransform = childrenTransform(); m_layerInfo.contentsOpaque = contentsOpaque(); m_layerInfo.contentsRect = contentsRect(); m_layerInfo.drawsContent = drawsContent(); m_layerInfo.mask = toWebLayerID(maskLayer()); m_layerInfo.masksToBounds = masksToBounds(); m_layerInfo.opacity = opacity(); m_layerInfo.parent = toWebLayerID(parent()); m_layerInfo.pos = position(); m_layerInfo.preserves3D = preserves3D(); m_layerInfo.replica = toWebLayerID(replicaLayer()); m_layerInfo.size = size(); m_layerInfo.transform = transform(); m_webGraphicsLayerClient->syncLayerState(m_id, m_layerInfo); }