Index: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.h |
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.h b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.h |
index f3c42251d7c436bfcb90c147b3812d7092fdd16d..bf17fa12ab0686bbc85dc15521bcde3c18a3aa1b 100644 |
--- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.h |
+++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.h |
@@ -26,18 +26,21 @@ |
#ifndef CachingWordShaper_h |
#define CachingWordShaper_h |
+#include "platform/fonts/shaping/ShapeResultBuffer.h" |
#include "platform/geometry/FloatRect.h" |
#include "platform/text/TextRun.h" |
#include "wtf/Allocator.h" |
#include "wtf/PassRefPtr.h" |
+#include "wtf/Vector.h" |
+#include <tuple> |
namespace blink { |
struct CharacterRange; |
class Font; |
class GlyphBuffer; |
-class SimpleFontData; |
class ShapeCache; |
+class SimpleFontData; |
struct GlyphData; |
class PLATFORM_EXPORT CachingWordShaper final { |
@@ -45,37 +48,35 @@ class PLATFORM_EXPORT CachingWordShaper final { |
WTF_MAKE_NONCOPYABLE(CachingWordShaper); |
public: |
- CachingWordShaper(ShapeCache* cache) : m_shapeCache(cache) {} |
+ explicit CachingWordShaper(const Font& font) : m_font(font) {} |
~CachingWordShaper() {} |
- float width(const Font*, |
- const TextRun&, |
+ float width(const TextRun&, |
HashSet<const SimpleFontData*>* fallbackFonts, |
FloatRect* glyphBounds); |
- int offsetForPosition(const Font*, |
- const TextRun&, |
+ int offsetForPosition(const TextRun&, |
float targetX, |
bool includePartialGlyphs); |
- float fillGlyphBuffer(const Font*, |
- const TextRun&, |
- HashSet<const SimpleFontData*>*, |
+ float fillGlyphBuffer(const TextRun&, |
GlyphBuffer*, |
unsigned from, |
unsigned to); |
- float fillGlyphBufferForTextEmphasis(const Font*, |
- const TextRun&, |
+ float fillGlyphBufferForTextEmphasis(const TextRun&, |
const GlyphData* emphasisData, |
GlyphBuffer*, |
unsigned from, |
unsigned to); |
- CharacterRange getCharacterRange(const Font*, |
- const TextRun&, |
+ CharacterRange getCharacterRange(const TextRun&, |
unsigned from, |
unsigned to); |
- Vector<CharacterRange> individualCharacterRanges(const Font*, const TextRun&); |
+ Vector<CharacterRange> individualCharacterRanges(const TextRun&); |
+ |
+ Vector<ShapeResultBuffer::RunFontData> runFontData(const TextRun&) const; |
private: |
- ShapeCache* m_shapeCache; |
+ ShapeCache* shapeCache() const; |
+ |
+ const Font& m_font; |
}; |
} // namespace blink |