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

Unified Diff: Source/core/rendering/svg/RenderSVGShape.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: Fixed Linux compilation (hopefuly Windows too), addressing some reviewer's suggestions. 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/RenderSVGShape.cpp
diff --git a/Source/core/rendering/svg/RenderSVGShape.cpp b/Source/core/rendering/svg/RenderSVGShape.cpp
index 08b862e74471186552f129155366cb59edbb1f9f..f173b912297013dee926f1f40bb88a9ffb4c17a4 100644
--- a/Source/core/rendering/svg/RenderSVGShape.cpp
+++ b/Source/core/rendering/svg/RenderSVGShape.cpp
@@ -267,27 +267,27 @@ void RenderSVGShape::paint(PaintInfo& paintInfo, const LayoutPoint&)
{
ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
- if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || isEmpty())
+ if (paintInfo.getContext()->paintingDisabled() || style()->visibility() == HIDDEN || isEmpty())
return;
FloatRect boundingBox = repaintRectInLocalCoordinates();
if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(boundingBox, m_localTransform, paintInfo))
return;
PaintInfo childPaintInfo(paintInfo);
- bool drawsOutline = style()->outlineWidth() && (childPaintInfo.phase == PaintPhaseOutline || childPaintInfo.phase == PaintPhaseSelfOutline);
- if (drawsOutline || childPaintInfo.phase == PaintPhaseForeground) {
- GraphicsContextStateSaver stateSaver(*childPaintInfo.context);
+ bool drawsOutline = style()->outlineWidth() && (childPaintInfo.getPhase() == PaintPhaseOutline || childPaintInfo.getPhase() == PaintPhaseSelfOutline);
+ if (drawsOutline || childPaintInfo.getPhase() == PaintPhaseForeground) {
+ GraphicsContextStateSaver stateSaver(*(childPaintInfo.getContext()));
childPaintInfo.applyTransform(m_localTransform);
- if (childPaintInfo.phase == PaintPhaseForeground) {
+ if (childPaintInfo.getPhase() == PaintPhaseForeground) {
SVGRenderingContext renderingContext(this, childPaintInfo);
if (renderingContext.isRenderingPrepared()) {
const SVGRenderStyle* svgStyle = style()->svgStyle();
if (svgStyle->shapeRendering() == SR_CRISPEDGES)
- childPaintInfo.context->setShouldAntialias(false);
+ childPaintInfo.getContext()->setShouldAntialias(false);
- fillAndStrokeShape(childPaintInfo.context);
+ fillAndStrokeShape(childPaintInfo.getContext());
if (!m_markerPositions.isEmpty())
drawMarkers(childPaintInfo);
}

Powered by Google App Engine
This is Rietveld 408576698