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

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

Issue 657553002: Fold SVGRenderSupport::fillOrStrokePath into only user (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/svg/SVGRenderSupport.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGTextRunRenderingContext.cpp
diff --git a/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp b/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp
index 43c3296c6ec9713cff13e9affb9ba0c26436a475..215ac0f2753ea9a034ed77cb88d509aecd0a8147 100644
--- a/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp
+++ b/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp
@@ -24,9 +24,6 @@
#include "core/rendering/svg/SVGTextRunRenderingContext.h"
#include "core/rendering/RenderObject.h"
-#include "core/rendering/svg/RenderSVGInlineText.h"
-#include "core/rendering/svg/RenderSVGResourceSolidColor.h"
-#include "core/rendering/svg/SVGRenderSupport.h"
#include "core/svg/SVGFontData.h"
#include "core/svg/SVGFontElement.h"
#include "core/svg/SVGFontFaceElement.h"
@@ -105,8 +102,6 @@ void SVGTextRunRenderingContext::drawSVGGlyphs(GraphicsContext* context, const T
glyphOrigin.setX(svgFontData->horizontalOriginX() * scale);
glyphOrigin.setY(svgFontData->horizontalOriginY() * scale);
- unsigned short resourceMode = context->textDrawingMode() == TextModeStroke ? ApplyToStrokeMode : ApplyToFillMode;
-
FloatPoint currentPoint = point;
for (int i = 0; i < numGlyphs; ++i) {
Glyph glyph = glyphBuffer.glyphAt(from + i);
@@ -141,7 +136,10 @@ void SVGTextRunRenderingContext::drawSVGGlyphs(GraphicsContext* context, const T
Path glyphPath = svgGlyph.pathData;
glyphPath.transform(glyphPathTransform);
- SVGRenderSupport::fillOrStrokePath(context, resourceMode, glyphPath);
+ if (context->textDrawingMode() == TextModeStroke)
+ context->strokePath(glyphPath);
+ else
+ context->fillPath(glyphPath);
if (isVerticalText)
currentPoint.move(0, advance);
« no previous file with comments | « Source/core/rendering/svg/SVGRenderSupport.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698