|
Lines 1648-1655
bool GraphicsLayerCA::needsCommit(const CommitState& commitState)
a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp_sec1
|
| 1648 |
return false; |
1648 |
return false; |
| 1649 |
} |
1649 |
} |
| 1650 |
|
1650 |
|
| 1651 |
// rootRelativeTransformForScaling is a transform from the root, but for layers with transform animations, it cherry-picked the state of the |
|
|
| 1652 |
// animation that contributes maximally to the scale (on every layer with animations down the hierarchy). |
| 1653 |
void GraphicsLayerCA::recursiveCommitChanges(CommitState& commitState, const TransformState& state, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool affectedByPageScale) |
1651 |
void GraphicsLayerCA::recursiveCommitChanges(CommitState& commitState, const TransformState& state, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool affectedByPageScale) |
| 1654 |
{ |
1652 |
{ |
| 1655 |
if (!needsCommit(commitState)) |
1653 |
if (!needsCommit(commitState)) |
|
Lines 1658-1663
void GraphicsLayerCA::recursiveCommitChanges(CommitState& commitState, const Tra
a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp_sec2
|
| 1658 |
TransformState localState = state; |
1656 |
TransformState localState = state; |
| 1659 |
CommitState childCommitState = commitState; |
1657 |
CommitState childCommitState = commitState; |
| 1660 |
|
1658 |
|
|
|
1659 |
++childCommitState.treeDepth; |
| 1660 |
if (structuralLayerPurpose() != NoStructuralLayer) |
| 1661 |
++childCommitState.treeDepth; |
| 1662 |
|
| 1661 |
bool affectedByTransformAnimation = commitState.ancestorHasTransformAnimation; |
1663 |
bool affectedByTransformAnimation = commitState.ancestorHasTransformAnimation; |
| 1662 |
|
1664 |
|
| 1663 |
bool accumulateTransform = accumulatesTransform(*this); |
1665 |
bool accumulateTransform = accumulatesTransform(*this); |
|
Lines 1734-1746
void GraphicsLayerCA::recursiveCommitChanges(CommitState& commitState, const Tra
a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp_sec3
|
| 1734 |
} |
1736 |
} |
| 1735 |
|
1737 |
|
| 1736 |
bool hasDescendantsWithRunningTransformAnimations = false; |
1738 |
bool hasDescendantsWithRunningTransformAnimations = false; |
| 1737 |
|
|
|
| 1738 |
for (auto& layer : children()) { |
| 1739 |
auto& currentChild = downcast<GraphicsLayerCA>(layer.get()); |
| 1740 |
currentChild.recursiveCommitChanges(childCommitState, localState, pageScaleFactor, baseRelativePosition, affectedByPageScale); |
| 1741 |
|
1739 |
|
| 1742 |
if (currentChild.isRunningTransformAnimation() || currentChild.hasDescendantsWithRunningTransformAnimations()) |
1740 |
if (childCommitState.treeDepth <= cMaxLayerTreeDepth) { |
| 1743 |
hasDescendantsWithRunningTransformAnimations = true; |
1741 |
for (auto& layer : children()) { |
|
|
1742 |
auto& currentChild = downcast<GraphicsLayerCA>(layer.get()); |
| 1743 |
currentChild.recursiveCommitChanges(childCommitState, localState, pageScaleFactor, baseRelativePosition, affectedByPageScale); |
| 1744 |
|
| 1745 |
if (currentChild.isRunningTransformAnimation() || currentChild.hasDescendantsWithRunningTransformAnimations()) |
| 1746 |
hasDescendantsWithRunningTransformAnimations = true; |
| 1747 |
} |
| 1744 |
} |
1748 |
} |
| 1745 |
|
1749 |
|
| 1746 |
commitState.totalBackdropFilterArea = childCommitState.totalBackdropFilterArea; |
1750 |
commitState.totalBackdropFilterArea = childCommitState.totalBackdropFilterArea; |
|
Lines 1858-1867
void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState
a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp_sec4
|
| 1858 |
{ |
1862 |
{ |
| 1859 |
SetForScope<bool> committingChangesChange(m_isCommittingChanges, true); |
1863 |
SetForScope<bool> committingChangesChange(m_isCommittingChanges, true); |
| 1860 |
|
1864 |
|
| 1861 |
++commitState.treeDepth; |
|
|
| 1862 |
if (m_structuralLayer) |
| 1863 |
++commitState.treeDepth; |
| 1864 |
|
| 1865 |
if (!m_uncommittedChanges) { |
1865 |
if (!m_uncommittedChanges) { |
| 1866 |
// Ensure that we cap layer depth in commitLayerChangesAfterSublayers(). |
1866 |
// Ensure that we cap layer depth in commitLayerChangesAfterSublayers(). |
| 1867 |
if (commitState.treeDepth > cMaxLayerTreeDepth) |
1867 |
if (commitState.treeDepth > cMaxLayerTreeDepth) |