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

Unified Diff: Source/core/paint/ClipRecorder.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/ClipRecorder.cpp
diff --git a/Source/core/paint/ClipRecorder.cpp b/Source/core/paint/ClipRecorder.cpp
index c59c85fddcdc7fde8e6ce678d66cef12e8160d91..dfb1bac30d87b6ee292fea0f8e9332fba4fdc0d4 100644
--- a/Source/core/paint/ClipRecorder.cpp
+++ b/Source/core/paint/ClipRecorder.cpp
@@ -26,16 +26,17 @@ void EndClipDisplayItem::replay(GraphicsContext* context)
context->restore();
}
-ClipRecorder::ClipRecorder(RenderLayer* renderLayer, GraphicsContext* graphicsContext, DisplayItem::Type clipType, const ClipRect& clipRect)
+ClipRecorder::ClipRecorder(const RenderObject* renderer, RenderLayer* renderLayer, GraphicsContext* graphicsContext, DisplayItem::Type clipType, const ClipRect& clipRect)
: m_graphicsContext(graphicsContext)
, m_renderLayer(renderLayer)
+ , m_renderer(renderer)
{
IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect());
if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) {
graphicsContext->save();
graphicsContext->clip(snappedClipRect);
} else {
- m_clipDisplayItem = new ClipDisplayItem(0, renderLayer, clipType, snappedClipRect);
+ m_clipDisplayItem = new ClipDisplayItem(renderer, renderLayer, clipType, snappedClipRect);
m_renderLayer->renderer()->view()->viewDisplayList().add(adoptPtr(m_clipDisplayItem));
chrishtr 2014/11/13 01:46:11 Just use m_renderLayer->renderer() rather than pas
leviw_travelin_and_unemployed 2014/11/13 01:46:40 Remove m_renderLayer and assert we have a layer.
pdr. 2014/11/13 06:49:28 I switched this to not track the render layer at a
}
}
@@ -51,7 +52,7 @@ void ClipRecorder::addRoundedRectClip(const RoundedRect& roundedRect)
ClipRecorder::~ClipRecorder()
{
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
- OwnPtr<EndClipDisplayItem> endClip = adoptPtr(new EndClipDisplayItem);
+ OwnPtr<EndClipDisplayItem> endClip = adoptPtr(new EndClipDisplayItem(m_renderer));
m_renderLayer->renderer()->view()->viewDisplayList().add(endClip.release());
} else {
m_graphicsContext->restore();

Powered by Google App Engine
This is Rietveld 408576698