void CoordinatedGraphicsLayer::syncLayerState() { if (!m_shouldSyncLayerState) return; m_shouldSyncLayerState = false; m_layerState.childrenTransform = childrenTransform(); m_layerState.contentsRect = contentsRect(); m_layerState.mask = toCoordinatedLayerID(maskLayer()); m_layerState.opacity = opacity(); m_layerState.replica = toCoordinatedLayerID(replicaLayer()); m_layerState.transform = transform(); m_layerState.anchorPoint = m_adjustedAnchorPoint; m_layerState.pos = m_adjustedPosition; m_layerState.size = m_adjustedSize; if (m_layerState.flagsChanged) { m_layerState.drawsContent = drawsContent(); m_layerState.contentsVisible = contentsAreVisible(); m_layerState.backfaceVisible = backfaceVisibility(); m_layerState.masksToBounds = masksToBounds(); m_layerState.preserves3D = preserves3D(); m_layerState.fixedToViewport = fixedToViewport(); m_layerState.showDebugBorders = isShowingDebugBorder(); m_layerState.showRepaintCounter = isShowingRepaintCounter(); m_layerState.isScrollable = isScrollable(); } if (m_layerState.showDebugBorders) updateDebugIndicators(); }
void CoordinatedGraphicsLayer::setReplicatedByLayer(GraphicsLayer* layer) { if (layer == replicaLayer()) return; GraphicsLayer::setReplicatedByLayer(layer); m_layerState.replica = toCoordinatedLayerID(layer); m_layerState.replicaChanged = true; didChangeLayerState(); }
void CoordinatedGraphicsLayer::syncChildren() { if (!m_shouldSyncChildren) return; m_shouldSyncChildren = false; m_layerState.childrenChanged = true; m_layerState.children.clear(); for (size_t i = 0; i < children().size(); ++i) m_layerState.children.append(toCoordinatedLayerID(children()[i])); }
void CoordinatedGraphicsLayer::syncChildren() { if (!m_shouldSyncChildren) return; m_shouldSyncChildren = false; m_layerState.childrenChanged = true; m_layerState.children.clear(); for (auto& child : children()) m_layerState.children.append(toCoordinatedLayerID(child)); }