| Index: Source/core/rendering/compositing/CompositingRequirementsUpdater.cpp
|
| diff --git a/Source/core/rendering/compositing/CompositingRequirementsUpdater.cpp b/Source/core/rendering/compositing/CompositingRequirementsUpdater.cpp
|
| index cb11a721f59b49073306b59b5ea4be623bd6f3a5..146c399aeccd3bd9518d2c469381aa75ec9bed74 100644
|
| --- a/Source/core/rendering/compositing/CompositingRequirementsUpdater.cpp
|
| +++ b/Source/core/rendering/compositing/CompositingRequirementsUpdater.cpp
|
| @@ -163,6 +163,7 @@ public:
|
| , m_subtreeIsCompositing(false)
|
| , m_hasUnisolatedCompositedBlendingDescendant(false)
|
| , m_testingOverlap(testOverlap)
|
| + , m_suppressLayerCreation(false)
|
| #ifndef NDEBUG
|
| , m_depth(0)
|
| #endif
|
| @@ -175,6 +176,7 @@ public:
|
| , m_subtreeIsCompositing(other.m_subtreeIsCompositing)
|
| , m_hasUnisolatedCompositedBlendingDescendant(other.m_hasUnisolatedCompositedBlendingDescendant)
|
| , m_testingOverlap(other.m_testingOverlap)
|
| + , m_suppressLayerCreation(other.m_suppressLayerCreation)
|
| #ifndef NDEBUG
|
| , m_depth(other.m_depth + 1)
|
| #endif
|
| @@ -186,6 +188,7 @@ public:
|
| bool m_subtreeIsCompositing;
|
| bool m_hasUnisolatedCompositedBlendingDescendant;
|
| bool m_testingOverlap;
|
| + bool m_suppressLayerCreation;
|
| #ifndef NDEBUG
|
| int m_depth;
|
| #endif
|
| @@ -201,6 +204,11 @@ static bool requiresCompositingOrSquashing(CompositingReasons reasons)
|
| return reasons != CompositingReasonNone;
|
| }
|
|
|
| +static bool shouldMakeDescendantsSuppressCompositedLayerCreation(CompositingReasons reasons)
|
| +{
|
| + return reasons & CompositingReasonWillChangeGpuRasterizationHint;
|
| +}
|
| +
|
| static CompositingReasons subtreeReasonsForCompositing(RenderObject* renderer, bool hasCompositedDescendants, bool has3DTransformedDescendants)
|
| {
|
| CompositingReasons subtreeReasons = CompositingReasonNone;
|
| @@ -294,6 +302,9 @@ void CompositingRequirementsUpdater::updateRecursive(RenderLayer* ancestorLayer,
|
|
|
| // First accumulate the straightforward compositing reasons.
|
| CompositingReasons directReasons = m_compositingReasonFinder.directReasons(layer, m_needsToRecomputeCompositingRequirements);
|
| + layer->setSuppressingCompositedLayerCreation(currentRecursionData.m_suppressLayerCreation);
|
| + if (layer->suppressingCompositedLayerCreation())
|
| + directReasons = m_compositingReasonFinder.suppressWillChangeAndAnimationForGpuRasterization(layer, directReasons);
|
|
|
| // Video is special. It's the only RenderLayer type that can both have
|
| // RenderLayer children and whose children can't use its backing to render
|
| @@ -348,6 +359,7 @@ void CompositingRequirementsUpdater::updateRecursive(RenderLayer* ancestorLayer,
|
| // ancestor with m_subtreeIsCompositing set to false.
|
| RecursionData childRecursionData(currentRecursionData);
|
| childRecursionData.m_subtreeIsCompositing = false;
|
| + childRecursionData.m_suppressLayerCreation = layer->suppressingCompositedLayerCreation() || shouldMakeDescendantsSuppressCompositedLayerCreation(directReasons);
|
|
|
| bool willBeCompositedOrSquashed = compositor->canBeComposited(layer) && requiresCompositingOrSquashing(reasonsToComposite);
|
| if (willBeCompositedOrSquashed) {
|
|
|