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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h

Issue 1939203002: Reland: Move glyph lookup to hb-ot-font and remove glyph cache in HarfBuzzFace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h
index 9f7c15a140927f7ae5b8e064eab60929d47d32b4..cdc3233a1f1b1ab6bf220a4f2740cabf2a868579 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h
+++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h
@@ -45,12 +45,11 @@
namespace blink {
class FontPlatformData;
+struct HarfBuzzFontData;
class HarfBuzzFace : public RefCounted<HarfBuzzFace> {
WTF_MAKE_NONCOPYABLE(HarfBuzzFace);
public:
- static const hb_tag_t vertTag;
- static const hb_tag_t vrt2Tag;
static PassRefPtr<HarfBuzzFace> create(FontPlatformData* platformData, uint64_t uniqueID)
{
@@ -61,18 +60,20 @@ public:
// In order to support the restricting effect of unicode-range optionally a
// range restriction can be passed in, which will restrict which glyphs we
// return in the harfBuzzGetGlyph function.
- hb_font_t* createFont(PassRefPtr<UnicodeRangeSet> = nullptr) const;
+ hb_font_t* getScaledFont(PassRefPtr<UnicodeRangeSet> = nullptr);
hb_face_t* face() const { return m_face; }
private:
HarfBuzzFace(FontPlatformData*, uint64_t);
hb_face_t* createFace();
+ void prepareHarfBuzzFontData();
FontPlatformData* m_platformData;
uint64_t m_uniqueID;
hb_face_t* m_face;
- WTF::HashMap<uint32_t, uint16_t>* m_glyphCacheForFaceCacheEntry;
+ OwnPtr<hb_font_t> m_unscaledFont;
+ OwnPtr<HarfBuzzFontData> m_harfBuzzFontData;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698