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

Unified Diff: Source/core/layout/LayoutTextCombine.cpp

Issue 1179723002: Store glyph bounds in WordMeasurement to avoid slow path width calc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For review Created 5 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
Index: Source/core/layout/LayoutTextCombine.cpp
diff --git a/Source/core/layout/LayoutTextCombine.cpp b/Source/core/layout/LayoutTextCombine.cpp
index d1b983df1ad2c7ae48829a3c0f3ac220e4f2f5a4..e519b9a7dbf1143ccdf570eda1a85ae210b2d78c 100644
--- a/Source/core/layout/LayoutTextCombine.cpp
+++ b/Source/core/layout/LayoutTextCombine.cpp
@@ -52,7 +52,7 @@ void LayoutTextCombine::setTextInternal(PassRefPtr<StringImpl> text)
updateIsCombined();
}
-float LayoutTextCombine::width(unsigned from, unsigned length, const Font& font, LayoutUnit xPosition, TextDirection direction, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
+float LayoutTextCombine::width(unsigned from, unsigned length, const Font& font, LayoutUnit xPosition, TextDirection direction, HashSet<const SimpleFontData*>* fallbackFonts, FloatRect* glyphBounds) const
{
if (!length)
return 0;
@@ -63,7 +63,7 @@ float LayoutTextCombine::width(unsigned from, unsigned length, const Font& font,
if (m_isCombined)
return font.fontDescription().computedSize();
- return LayoutText::width(from, length, font, xPosition, direction, fallbackFonts, glyphOverflow);
+ return LayoutText::width(from, length, font, xPosition, direction, fallbackFonts, glyphBounds);
}
void scaleHorizontallyAndTranslate(GraphicsContext& context, float scaleX, float centerX, float offsetX, float offsetY)

Powered by Google App Engine
This is Rietveld 408576698