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

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

Issue 571923002: Move geometry generation out of RenderSVGResource*::postApplyResource (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop curly braces. Created 6 years, 3 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/RenderSVGShape.cpp ('k') | Source/core/rendering/svg/SVGRenderSupport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGInlineTextBox.cpp
diff --git a/Source/core/rendering/svg/SVGInlineTextBox.cpp b/Source/core/rendering/svg/SVGInlineTextBox.cpp
index a672ed8a26e57efdf50e1a225badb75b820d9984..8efc220aef7ff9f00f594bd39129efb3457d16e6 100644
--- a/Source/core/rendering/svg/SVGInlineTextBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineTextBox.cpp
@@ -37,6 +37,7 @@
#include "core/rendering/svg/RenderSVGInlineText.h"
#include "core/rendering/svg/RenderSVGResource.h"
#include "core/rendering/svg/RenderSVGResourceSolidColor.h"
+#include "core/rendering/svg/SVGRenderSupport.h"
#include "core/rendering/svg/SVGResourcesCache.h"
#include "core/rendering/svg/SVGTextRunRenderingContext.h"
#include "platform/FloatConversion.h"
@@ -353,7 +354,7 @@ public:
~PaintingResourceScope() { ASSERT(!m_paintingResource); }
bool acquirePaintingResource(GraphicsContext*&, float scalingFactor, RenderStyle*, RenderSVGResourceModeFlags);
- void releasePaintingResource(GraphicsContext*&, const Path*, RenderSVGResourceModeFlags);
+ void releasePaintingResource(GraphicsContext*&);
private:
RenderObject& m_renderer;
@@ -401,12 +402,11 @@ bool PaintingResourceScope::acquirePaintingResource(GraphicsContext*& context, f
return true;
}
-void PaintingResourceScope::releasePaintingResource(GraphicsContext*& context, const Path* path,
- RenderSVGResourceModeFlags resourceMode)
+void PaintingResourceScope::releasePaintingResource(GraphicsContext*& context)
{
ASSERT(m_paintingResource);
- m_paintingResource->postApplyResource(&m_renderer, context, resourceMode, path, 0);
+ m_paintingResource->postApplyResource(&m_renderer, context);
m_paintingResource = 0;
#if ENABLE(SVG_FONTS)
@@ -590,8 +590,10 @@ void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext* context, TextDe
// acquirePaintingResource also modifies state if the scalingFactor is non-identity.
// Above we have saved the state for this case.
PaintingResourceScope resourceScope(*decorationRenderer);
- if (resourceScope.acquirePaintingResource(context, scalingFactor, decorationStyle, resourceMode))
- resourceScope.releasePaintingResource(context, &path, resourceMode);
+ if (resourceScope.acquirePaintingResource(context, scalingFactor, decorationStyle, resourceMode)) {
+ SVGRenderSupport::fillOrStrokePath(context, resourceMode, path);
+ resourceScope.releasePaintingResource(context);
+ }
}
void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyle* style,
@@ -633,7 +635,7 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyl
textSize.width(), textSize.height());
scaledFont.drawText(context, textRunPaintInfo, textOrigin);
- resourceScope.releasePaintingResource(context, 0, resourceMode);
+ resourceScope.releasePaintingResource(context);
}
if (scalingFactor != 1)
« no previous file with comments | « Source/core/rendering/svg/RenderSVGShape.cpp ('k') | Source/core/rendering/svg/SVGRenderSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698