Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1147)

Unified Diff: Source/core/paint/LayerPainter.cpp

Issue 719353004: [Slimming Paint] Track clip renderers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/paint/LayerPainter.cpp
diff --git a/Source/core/paint/LayerPainter.cpp b/Source/core/paint/LayerPainter.cpp
index 40083b4f2bc907007d571ea51ba840183f145729..959621cafa398f97031a12d4ec4844c8c242cbe2 100644
--- a/Source/core/paint/LayerPainter.cpp
+++ b/Source/core/paint/LayerPainter.cpp
@@ -101,7 +101,7 @@ void LayerPainter::paintLayer(GraphicsContext* context, const LayerPaintingInfo&
clipRect.intersect(paintingInfo.paintDirtyRect);
if (needsToClip(paintingInfo, clipRect)) {
- clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), context, DisplayItem::ClipLayerParent, clipRect));
+ clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.clippingContainer(), m_renderLayer.parent(), context, DisplayItem::ClipLayerParent, clipRect));
if (clipRect.hasRadius())
applyRoundedRectClips(*m_renderLayer.parent(), paintingInfo, context, paintFlags, *clipRecorder);
}
@@ -506,7 +506,7 @@ void LayerPainter::paintOverflowControlsForFragments(const LayerFragments& layer
OwnPtr<ClipRecorder> clipRecorder;
if (needsToClip(localPaintingInfo, fragment.backgroundRect)) {
- clipRecorder = adoptPtr(new ClipRecorder(&m_renderLayer, context, DisplayItem::ClipLayerOverflowControls, fragment.backgroundRect));
+ clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.clippingContainer(), &m_renderLayer, context, DisplayItem::ClipLayerOverflowControls, fragment.backgroundRect));
if (fragment.backgroundRect.hasRadius())
applyRoundedRectClips(m_renderLayer, localPaintingInfo, context, paintFlags, *clipRecorder);
}
@@ -695,7 +695,7 @@ void LayerPainter::paintFragmentWithPhase(PaintPhase phase, const LayerFragment&
ASSERT_NOT_REACHED();
}
- clipRecorder = adoptPtr(new ClipRecorder(&m_renderLayer, context, clipType, clipRect));
+ clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.clippingContainer(), &m_renderLayer, context, clipType, clipRect));
if (clipRect.hasRadius())
applyRoundedRectClips(m_renderLayer, paintingInfo, context, paintFlags, *clipRecorder, clippingRule);
}
@@ -737,7 +737,7 @@ void LayerPainter::paintForegroundForFragments(const LayerFragments& layerFragme
ClipState clipState = HasNotClipped;
OwnPtr<ClipRecorder> clipRecorder;
if (shouldClip && needsToClip(localPaintingInfo, layerFragments[0].foregroundRect)) {
- clipRecorder = adoptPtr(new ClipRecorder(&m_renderLayer, context, DisplayItem::ClipLayerForeground, layerFragments[0].foregroundRect));
+ clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.clippingContainer(), &m_renderLayer, context, DisplayItem::ClipLayerForeground, layerFragments[0].foregroundRect));
if (layerFragments[0].foregroundRect.hasRadius())
applyRoundedRectClips(m_renderLayer, localPaintingInfo, context, paintFlags, *clipRecorder);
clipState = HasClipped;
@@ -828,7 +828,7 @@ void LayerPainter::paintTransformedLayerIntoFragments(GraphicsContext* context,
OwnPtr<ClipRecorder> clipRecorder;
if (needsToClip(paintingInfo, clipRect))
- clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), context, DisplayItem::ClipLayerFragmentParent, clipRect));
+ clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.clippingContainer(), m_renderLayer.parent(), context, DisplayItem::ClipLayerFragmentParent, clipRect));
paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragment.paginationOffset);
}

Powered by Google App Engine
This is Rietveld 408576698