void LayerTreeCoordinator::forceRepaint() { // This is necessary for running layout tests. Since in this case we are not waiting for a UIProcess to reply nicely. // Instead we are just triggering forceRepaint. But we still want to have the scripted animation callbacks being executed. syncDisplayState(); // We need to schedule another flush, otherwise the forced paint might cancel a later expected flush. // This is aligned with LayerTreeHostCA. scheduleLayerFlush(); flushPendingLayerChanges(); }
void LayerTreeCoordinator::performScheduledLayerFlush() { if (m_isSuspended || m_waitingForUIProcess) return; syncDisplayState(); if (!m_isValid) return; if (flushPendingLayerChanges()) didPerformScheduledLayerFlush(); }
void LayerTreeCoordinator::performScheduledLayerFlush() { if (m_isSuspended || m_waitingForUIProcess) return; // We lock the animations while performing layout, to avoid flickers caused by animations continuing in the UI process while // the web process layout wants to cancel them. lockAnimations(); syncDisplayState(); // We can unlock the animations before flushing if there are no visible changes, for example if there are content updates // in a layer with opacity 0. bool canUnlockBeforeFlush = !m_isValid || !toCoordinatedGraphicsLayer(m_rootLayer.get())->hasPendingVisibleChanges(); if (canUnlockBeforeFlush) unlockAnimations(); if (!m_isValid) return; if (flushPendingLayerChanges()) didPerformScheduledLayerFlush(); }