Index: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp |
diff --git a/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp b/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp |
index 7704bcef04dc2545772e881fc0ebb1e7ddc8889c..1238cb5637435604dadb922286da16fd5ab1fe9c 100644 |
--- a/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp |
+++ b/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp |
@@ -2128,24 +2128,24 @@ void CompositedDeprecatedPaintLayerMapping::doPaintTask(const GraphicsLayerPaint |
// FIXME: Combine similar code here and LayerClipRecorder. |
dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); |
{ |
- OwnPtr<DisplayItem> clipDisplayItem = ClipDisplayItem::create(*this, DisplayItem::ClipLayerOverflowControls, dirtyRect); |
if (context->displayItemList()) { |
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
if (!context->displayItemList()->displayItemConstructionIsDisabled()) |
- context->displayItemList()->add(clipDisplayItem.release()); |
+ context->displayItemList()->createAndAppendIfNeeded<ClipDisplayItem>(*this, DisplayItem::ClipLayerOverflowControls, dirtyRect); |
} else { |
- clipDisplayItem->replay(*context); |
+ ClipDisplayItem clipDisplayItem(*this, DisplayItem::ClipLayerOverflowControls, dirtyRect); |
+ clipDisplayItem.replay(*context); |
} |
} |
DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, paintingInfo, paintLayerFlags); |
{ |
- OwnPtr<DisplayItem> endClipDisplayItem = EndClipDisplayItem::create(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowControls)); |
if (context->displayItemList()) { |
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
if (!context->displayItemList()->displayItemConstructionIsDisabled()) |
- context->displayItemList()->add(endClipDisplayItem.release()); |
+ context->displayItemList()->createAndAppendIfNeeded<EndClipDisplayItem>(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowControls)); |
} else { |
- endClipDisplayItem->replay(*context); |
+ EndClipDisplayItem endClipDisplayItem(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowControls)); |
+ endClipDisplayItem.replay(*context); |
} |
} |
} |