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

Unified Diff: Source/core/rendering/svg/RenderSVGRoot.cpp

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Second try Created 7 years, 5 months 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/rendering/svg/RenderSVGRoot.cpp
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp
index 0537fbb1afc3585edcb5fe068c2d3787430075f3..32a61e1ad2187be1f9eef58ee2c2dd532d60d438 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp
@@ -261,7 +261,7 @@ void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paint
return;
// Don't paint, if the context explicitly disabled it.
- if (paintInfo.context->paintingDisabled())
+ if (paintInfo.getContext()->paintingDisabled())
return;
// An empty viewBox also disables rendering.
@@ -279,21 +279,21 @@ void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paint
if (!firstChild()) {
SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this);
if (!resources || !resources->filter()) {
- if (page && paintInfo.phase == PaintPhaseForeground)
+ if (page && paintInfo.getPhase() == PaintPhaseForeground)
page->addRelevantUnpaintedObject(this, visualOverflowRect());
return;
}
}
- if (page && paintInfo.phase == PaintPhaseForeground)
+ if (page && paintInfo.getPhase() == PaintPhaseForeground)
page->addRelevantRepaintedObject(this, visualOverflowRect());
// Make a copy of the PaintInfo because applyTransform will modify the damage rect.
PaintInfo childPaintInfo(paintInfo);
- childPaintInfo.context->save();
+ childPaintInfo.getContext()->save();
// Apply initial viewport clip - not affected by overflow handling
- childPaintInfo.context->clip(pixelSnappedIntRect(overflowClipRect(paintOffset, paintInfo.renderRegion)));
+ childPaintInfo.getContext()->clip(pixelSnappedIntRect(overflowClipRect(paintOffset, paintInfo.getRenderRegion())));
// Convert from container offsets (html renderers) to a relative transform (svg renderers).
// Transform from our paint container's coordinate system to our local coords.
@@ -305,7 +305,7 @@ void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paint
{
SVGRenderingContext renderingContext;
bool continueRendering = true;
- if (childPaintInfo.phase == PaintPhaseForeground) {
+ if (childPaintInfo.getPhase() == PaintPhaseForeground) {
renderingContext.prepareToRenderSVGContent(this, childPaintInfo);
continueRendering = renderingContext.isRenderingPrepared();
}
@@ -314,7 +314,7 @@ void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paint
RenderBox::paint(childPaintInfo, LayoutPoint());
}
- childPaintInfo.context->restore();
+ childPaintInfo.getContext()->restore();
}
void RenderSVGRoot::willBeDestroyed()

Powered by Google App Engine
This is Rietveld 408576698