Changeset 238363 in webkit
- Timestamp:
- Nov 18, 2018 9:26:15 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r238360 r238363 1 2018-11-18 Zan Dobersek <zdobersek@igalia.com> 2 3 HarfBuzzFace::CacheEntry should use 32-bit values in its HashMap 4 https://bugs.webkit.org/show_bug.cgi?id=191825 5 6 Reviewed by Michael Catanzaro. 7 8 The HashMap-based glyph cache contained in HarfBuzzFace::CacheEntry 9 objects is used to map given Unicode codepoints to corresponding 10 glyph indices (which occurs in the harfBuzzGetGlyph() function that's 11 invoked by HarfBuzz). 12 13 The 16-bit unsigned integer as the map's value type is not enough here 14 when the glyph index mapping is done through Freetype -- its API returns 15 32-bit glyph indices, and Cairo assigns this value to the 64-bit 16 unsigned index variable in the cairo_glyph_t struct. The value type is 17 thus bumped to 32 bits to match the unsigned type size of the index's 18 origin. 19 20 * platform/graphics/harfbuzz/HarfBuzzFace.h: 21 * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: 22 1 23 2018-11-17 Wenson Hsieh <wenson_hsieh@apple.com> 2 24 -
trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzFace.h
r228553 r238363 61 61 class CacheEntry : public RefCounted<CacheEntry> { 62 62 public: 63 using GlyphCache = HashMap<uint32_t, uint 16_t>;63 using GlyphCache = HashMap<uint32_t, uint32_t>; 64 64 65 65 static Ref<CacheEntry> create(hb_face_t* face) -
trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
r228553 r238363 51 51 52 52 struct HarfBuzzFontData { 53 WTF::HashMap<uint32_t, uint 16_t>& glyphCacheForFaceCacheEntry;53 WTF::HashMap<uint32_t, uint32_t>& glyphCacheForFaceCacheEntry; 54 54 RefPtr<cairo_scaled_font_t> cairoScaledFont; 55 55 };
Note: See TracChangeset
for help on using the changeset viewer.