void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly() { ASSERT(m_coordinator->isFlushingLayerChanges()); // When we have a transform animation, we need to update visible rect every frame to adjust the visible rect of a backing store. bool hasActiveTransformAnimation = selfOrAncestorHasActiveTransformAnimation(); if (hasActiveTransformAnimation) m_movingVisibleRect = true; // Sets the values. computePixelAlignment(m_adjustedPosition, m_adjustedSize, m_adjustedAnchorPoint, m_pixelAlignmentOffset); syncImageBacking(); syncLayerState(); syncAnimations(); computeTransformedVisibleRect(); syncChildren(); #if ENABLE(CSS_FILTERS) syncFilters(); #endif updateContentBuffers(); #if USE(GRAPHICS_SURFACE) syncCanvas(); #endif if (m_layerState.hasPendingChanges()) { m_coordinator->syncLayerState(m_id, m_layerState); resetLayerState(); } // Only unset m_movingVisibleRect after we have updated the visible rect after the animation stopped. if (!hasActiveTransformAnimation) m_movingVisibleRect = false; }
void CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers() { if (m_layerState.hasPendingChanges()) { m_coordinator->syncLayerState(m_id, m_layerState); resetLayerState(); } for (size_t i = 0; i < children().size(); ++i) toCoordinatedGraphicsLayer(children()[i])->syncPendingStateChangesIncludingSubLayers(); }
void CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers() { if (m_layerState.hasPendingChanges()) { m_coordinator->syncLayerState(m_id, m_layerState); resetLayerState(); } if (maskLayer()) toCoordinatedGraphicsLayer(maskLayer())->syncPendingStateChangesIncludingSubLayers(); for (auto& child : children()) toCoordinatedGraphicsLayer(child)->syncPendingStateChangesIncludingSubLayers(); }