| Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| index 00b42f49923192a032fd0eac271336db5f9aa865..0ed85739180563bfd65c28b2008e2d726ca40336 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| @@ -1041,8 +1041,25 @@ bool PaintArtifactCompositor::mightOverlap(
|
| const PaintChunk& paintChunk,
|
| const PendingLayer& candidatePendingLayer,
|
| GeometryMapper& geometryMapper) {
|
| - // TODO(chrishtr): implement
|
| - return true;
|
| + PropertyTreeState rootPropertyTreeState(
|
| + TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
|
| + EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root());
|
| +
|
| + bool success = false;
|
| + FloatRect paintChunkScreenVisualRect =
|
| + geometryMapper.localToVisualRectInAncestorSpace(
|
| + paintChunk.bounds, paintChunk.properties.propertyTreeState,
|
| + rootPropertyTreeState, success);
|
| + DCHECK(success);
|
| +
|
| + success = false;
|
| + FloatRect pendingLayerScreenVisualRect =
|
| + geometryMapper.localToVisualRectInAncestorSpace(
|
| + candidatePendingLayer.bounds, candidatePendingLayer.propertyTreeState,
|
| + rootPropertyTreeState, success);
|
| + DCHECK(success);
|
| +
|
| + return paintChunkScreenVisualRect.intersects(pendingLayerScreenVisualRect);
|
| }
|
|
|
| PaintArtifactCompositor::PendingLayer::PendingLayer(
|
|
|