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

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

Issue 565063003: Eliminate SVGTextRunRenderingContext::m_activePaintingResource (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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 | « no previous file | Source/core/rendering/svg/SVGTextRunRenderingContext.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 5b09a43c7dd9b144922ffa3ac822c1971be3eefc..ce4e89cd9a28513c1af3830a129c4a861367e786 100644
--- a/Source/core/rendering/svg/SVGInlineTextBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineTextBox.cpp
@@ -345,9 +345,8 @@ void SVGInlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
class PaintingResourceScope {
public:
- PaintingResourceScope(RenderObject& renderer, TextRun::RenderingContext* renderingContext = 0)
+ PaintingResourceScope(RenderObject& renderer)
: m_renderer(renderer)
- , m_renderingContext(renderingContext)
, m_paintingResource(0)
{
}
@@ -358,7 +357,6 @@ public:
private:
RenderObject& m_renderer;
- TextRun::RenderingContext* m_renderingContext;
RenderSVGResource* m_paintingResource;
};
@@ -387,12 +385,6 @@ bool PaintingResourceScope::acquirePaintingResource(GraphicsContext*& context, f
if (scalingFactor != 1 && resourceModeFlags & ApplyToStrokeMode)
context->setStrokeThickness(context->strokeThickness() * scalingFactor);
-#if ENABLE(SVG_FONTS)
- // SVG Fonts need access to the painting resource used to draw the current text chunk.
- if (m_renderingContext)
- static_cast<SVGTextRunRenderingContext*>(m_renderingContext)->setActivePaintingResource(m_paintingResource);
-#endif
-
return true;
}
@@ -402,11 +394,6 @@ void PaintingResourceScope::releasePaintingResource(GraphicsContext*& context)
m_paintingResource->postApplyResource(&m_renderer, context);
m_paintingResource = 0;
-
-#if ENABLE(SVG_FONTS)
- if (m_renderingContext)
- static_cast<SVGTextRunRenderingContext*>(m_renderingContext)->setActivePaintingResource(0);
-#endif
}
TextRun SVGInlineTextBox::constructTextRun(RenderStyle* style, const SVGTextFragment& fragment) const
@@ -618,7 +605,7 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyl
if (hasShadow)
context->setDrawLooper(shadowList->createDrawLooper(DrawLooperBuilder::ShadowRespectsAlpha));
- PaintingResourceScope resourceScope(parent()->renderer(), textRun.renderingContext());
+ PaintingResourceScope resourceScope(parent()->renderer());
if (resourceScope.acquirePaintingResource(context, scalingFactor, style, resourceMode)) {
TextRunPaintInfo textRunPaintInfo(textRun);
textRunPaintInfo.from = startPosition;
« no previous file with comments | « no previous file | Source/core/rendering/svg/SVGTextRunRenderingContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698