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

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

Issue 362923007: Move transformationForTextBox() call out of the fragment-loop (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGTextLayoutEngine.cpp
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
index fc5dc792329317ece1c8def55a91bacc2098e286..2414c7597d8fd636f22338f5548a76e12d40ff21 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
@@ -295,13 +295,13 @@ void SVGTextLayoutEngine::finalizeTransformMatrices(Vector<SVGInlineTextBox*>& b
AffineTransform textBoxTransformation;
for (unsigned boxPosition = 0; boxPosition < boxCount; ++boxPosition) {
SVGInlineTextBox* textBox = boxes.at(boxPosition);
- Vector<SVGTextFragment>& fragments = textBox->textFragments();
+ m_chunkLayoutBuilder.transformationForTextBox(textBox, textBoxTransformation);
pdr. 2014/07/03 22:56:49 What do you think about refactoring this function
+ if (textBoxTransformation.isIdentity())
+ continue;
+ Vector<SVGTextFragment>& fragments = textBox->textFragments();
unsigned fragmentCount = fragments.size();
for (unsigned i = 0; i < fragmentCount; ++i) {
- m_chunkLayoutBuilder.transformationForTextBox(textBox, textBoxTransformation);
- if (textBoxTransformation.isIdentity())
- continue;
ASSERT(fragments[i].lengthAdjustTransform.isIdentity());
fragments[i].lengthAdjustTransform = textBoxTransformation;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698