| Index: third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
|
| index ab4e692dba4db42f630a0660bfc8f025455fb260..4c84c96ecc5dae17915213405b215bdca7a848e4 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
|
| @@ -383,6 +383,23 @@ int PropertyTreeManager::SwitchToEffectNode(
|
| return GetCurrentCompositorEffectNodeIndex();
|
| }
|
|
|
| +void PropertyTreeManager::BuildRoundedClipEffectNodesBetween(
|
| + const ClipPaintPropertyNode* descendant_clip,
|
| + const ClipPaintPropertyNode* ancestor_clip) {
|
| + if (!descendant_clip || descendant_clip == ancestor_clip)
|
| + return;
|
| + BuildRoundedClipEffectNodesBetween(descendant_clip->Parent(), ancestor_clip);
|
| + if (!descendant_clip->ClipRect().IsRounded())
|
| + return;
|
| + BuildRoundedClipEffect(descendant_clip);
|
| +}
|
| +
|
| +void PropertyTreeManager::BuildRoundedClipEffect(
|
| + const ClipPaintPropertyNode* clip) {
|
| + // todo.
|
| + // BuildEffectNode(...);
|
| +}
|
| +
|
| void PropertyTreeManager::BuildEffectNodesRecursively(
|
| const EffectPaintPropertyNode* next_effect) {
|
| if (next_effect == CurrentEffectNode())
|
| @@ -392,6 +409,9 @@ void PropertyTreeManager::BuildEffectNodesRecursively(
|
| BuildEffectNodesRecursively(next_effect->Parent());
|
| DCHECK_EQ(next_effect->Parent(), CurrentEffectNode());
|
|
|
| + BuildRoundedClipEffectNodesBetween(next_effect->OutputClip(),
|
| + next_effect->Parent()->OutputClip());
|
| +
|
| #if DCHECK_IS_ON()
|
| DCHECK(!effect_nodes_converted_.Contains(next_effect))
|
| << "Malformed paint artifact. Paint chunks under the same effect should "
|
| @@ -399,6 +419,11 @@ void PropertyTreeManager::BuildEffectNodesRecursively(
|
| effect_nodes_converted_.insert(next_effect);
|
| #endif
|
|
|
| + BuildEffectNode(next_effect);
|
| +}
|
| +
|
| +void PropertyTreeManager::BuildEffectNode(
|
| + const EffectPaintPropertyNode* next_effect) {
|
| // An effect node can't omit render surface if it has child with exotic
|
| // blending mode. See comments below for more detail.
|
| // TODO(crbug.com/504464): Remove premature optimization here.
|
|
|