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

Unified Diff: Source/core/layout/svg/SVGLayoutSupport.cpp

Issue 1070703002: Explicitly use SkPaint(s) in SVGInlineTextBoxPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/layout/svg/SVGLayoutSupport.cpp
diff --git a/Source/core/layout/svg/SVGLayoutSupport.cpp b/Source/core/layout/svg/SVGLayoutSupport.cpp
index 965a2dfbd067a340a9993cb8eeb3ce54a1b30dd4..162091966d3540e51f93309af69db85ebe3f1cfd 100644
--- a/Source/core/layout/svg/SVGLayoutSupport.cpp
+++ b/Source/core/layout/svg/SVGLayoutSupport.cpp
@@ -356,23 +356,6 @@ DashArray SVGLayoutSupport::resolveSVGDashArray(const SVGDashArray& svgDashArray
return dashArray;
}
-void SVGLayoutSupport::applyStrokeStyleToContext(GraphicsContext& context, const ComputedStyle& style, const LayoutObject& object)
-{
- ASSERT(object.node());
- ASSERT(object.node()->isSVGElement());
-
- const SVGComputedStyle& svgStyle = style.svgStyle();
-
- SVGLengthContext lengthContext(toSVGElement(object.node()));
- context.setStrokeThickness(lengthContext.valueForLength(svgStyle.strokeWidth()));
- context.setLineCap(svgStyle.capStyle());
- context.setLineJoin(svgStyle.joinStyle());
- context.setMiterLimit(svgStyle.strokeMiterLimit());
-
- DashArray dashArray = resolveSVGDashArray(*svgStyle.strokeDashArray(), style, lengthContext);
- context.setLineDash(dashArray, lengthContext.valueForLength(svgStyle.strokeDashOffset(), style));
-}
-
void SVGLayoutSupport::applyStrokeStyleToStrokeData(StrokeData& strokeData, const ComputedStyle& style, const LayoutObject& object)
{
ASSERT(object.node());
@@ -390,37 +373,6 @@ void SVGLayoutSupport::applyStrokeStyleToStrokeData(StrokeData& strokeData, cons
strokeData.setLineDash(dashArray, lengthContext.valueForLength(svgStyle.strokeDashOffset(), style));
}
-bool SVGLayoutSupport::updateGraphicsContext(const PaintInfo& paintInfo, GraphicsContextStateSaver& stateSaver, const ComputedStyle& style, LayoutObject& layoutObject, LayoutSVGResourceMode resourceMode, const AffineTransform* additionalPaintServerTransform)
-{
- ASSERT(paintInfo.context == stateSaver.context());
-
- GraphicsContext& context = *paintInfo.context;
- if (paintInfo.isRenderingClipPathAsMaskImage()) {
- if (resourceMode == ApplyToStrokeMode)
- return false;
- context.setFillColor(SVGComputedStyle::initialFillPaintColor());
- return true;
- }
-
- SVGPaintServer paintServer = SVGPaintServer::requestForLayoutObject(layoutObject, style, resourceMode);
- if (!paintServer.isValid())
- return false;
-
- if (additionalPaintServerTransform && paintServer.isTransformDependent())
- paintServer.prependTransform(*additionalPaintServerTransform);
-
- const SVGComputedStyle& svgStyle = style.svgStyle();
- float paintAlpha = resourceMode == ApplyToFillMode ? svgStyle.fillOpacity() : svgStyle.strokeOpacity();
- paintServer.apply(context, resourceMode, paintAlpha, stateSaver);
-
- if (resourceMode == ApplyToFillMode)
- context.setFillRule(svgStyle.fillRule());
- else
- applyStrokeStyleToContext(context, style, layoutObject);
-
- return true;
-}
-
bool SVGLayoutSupport::isLayoutableTextNode(const LayoutObject* object)
{
ASSERT(object->isText());

Powered by Google App Engine
This is Rietveld 408576698