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

Unified Diff: Source/platform/fonts/shaping/HarfBuzzShaper.h

Issue 1248453004: Change Font::offsetForPositionForComplexText to use CachingWordShapeIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TestExpectations and rebase Created 5 years, 5 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/platform/fonts/shaping/HarfBuzzShaper.h
diff --git a/Source/platform/fonts/shaping/HarfBuzzShaper.h b/Source/platform/fonts/shaping/HarfBuzzShaper.h
index f6b1d5c2facfa26b7613892b913d7c8a3970d6d6..4b69c3c59d023b006a7dc0dec71e71e9359a52ae 100644
--- a/Source/platform/fonts/shaping/HarfBuzzShaper.h
+++ b/Source/platform/fonts/shaping/HarfBuzzShaper.h
@@ -46,6 +46,7 @@
namespace blink {
+class CachingWordShapeIterator;
class Font;
class GlyphBuffer;
class SimpleFontData;
@@ -61,13 +62,14 @@ public:
float width() { return m_width; }
FloatRect bounds() { return m_glyphBoundingBox; }
- int offsetForPosition(float targetX);
unsigned numCharacters() const { return m_numCharacters; }
const HashSet<RefPtr<SimpleFontData>>* fallbackFonts() const
{
return &m_fallbackFonts;
}
+ static int offsetForPosition(CachingWordShapeIterator&,
eae 2015/07/22 18:33:22 How about changing this to take a vector of shape
kojii 2015/07/23 05:06:12 Makes sense, done.
+ const TextRun&, float targetX);
static float fillGlyphBuffer(Vector<RefPtr<ShapeResult>>&,
GlyphBuffer*, const TextRun&, unsigned from, unsigned to);
static float fillGlyphBufferForTextEmphasis(Vector<RefPtr<ShapeResult>>&,
@@ -92,6 +94,7 @@ private:
, m_numGlyphs(0)
, m_direction(direction) { }
+ int offsetForPosition(float targetX);
template<TextDirection>
float fillGlyphBufferForRun(GlyphBuffer*, const RunInfo*,
float initialAdvance, unsigned from, unsigned to, unsigned runOffset);
« no previous file with comments | « Source/platform/fonts/shaping/CachingWordShaper.cpp ('k') | Source/platform/fonts/shaping/HarfBuzzShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698