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

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 merge issues after LGTM Created 6 years, 11 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/InlineTextBox.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/SVGTextMetricsBuilder.cpp
diff --git a/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp b/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
index f8189602b3c50ac22c7f7e76a9e858409f0d9ec9..55dc71f7ab71e0af722c755874900b889f7cfeea 100644
--- a/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
+++ b/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
@@ -102,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) == ComplexPath;
+ CodePath codePath = scaledFont.codePath(m_run);
+ m_isComplexText = codePath == ComplexPath;
+ m_run.setCharacterScanForCodePath(!m_isComplexText);
if (m_isComplexText)
m_simpleWidthIterator.clear();
« no previous file with comments | « Source/core/rendering/InlineTextBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698