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

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

Issue 111833006: Avoiding multiple text/string parsing while creating TextRun (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@FontOptPatch1
Patch Set: Fixing review comments for rebasing files Created 7 years 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/SVGTextMetricsBuilder.cpp
diff --git a/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp b/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
old mode 100644
new mode 100755
index 46a27979e9da770a8d174bdf8b3f2d0a0f87ddb5..aa33e98cc47c78d11c956575d3980a98d8c474d6
--- a/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
+++ b/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
@@ -23,6 +23,7 @@
#include "core/rendering/svg/RenderSVGInlineText.h"
#include "core/rendering/svg/RenderSVGText.h"
+#include "platform/text/TextPath.h"
namespace WebCore {
@@ -101,7 +102,9 @@ void SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer(RenderSVGInlin
const Font& scaledFont = text->scaledFont();
m_run = SVGTextMetrics::constructTextRun(text, 0, text->textLength());
- m_isComplexText = scaledFont.codePath(m_run) == Font::Complex;
+ CodePath tmpPath = scaledFont.codePath(m_run);
eseidel 2013/12/27 04:36:45 No need to prefix this with "tmp" since it's the o
+ m_run.setCharacterScanForCodePathValue(tmpPath);
+ m_isComplexText = tmpPath == ComplexPath;
if (m_isComplexText)
m_simpleWidthIterator.clear();

Powered by Google App Engine
This is Rietveld 408576698