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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp

Issue 1733193002: 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: updated memory management, no more ref'ing, OwnPtr in HarfBuzzFace Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp b/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
index 05f279ad69feec7788e77d85c6195894dec78698..30583a4f97a98b099f114ff3fbffa2cd87247819 100644
--- a/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
@@ -286,20 +286,20 @@ static inline bool tableHasSpace(hb_face_t* face, hb_set_t* glyphs,
bool FontPlatformData::hasSpaceInLigaturesOrKerning(
TypesettingFeatures features) const
{
- const HarfBuzzFace* hbFace = harfBuzzFace();
+ HarfBuzzFace* hbFace = harfBuzzFace();
if (!hbFace)
return false;
hb_face_t* face = hbFace->face();
ASSERT(face);
- OwnPtr<hb_font_t> font = adoptPtr(hbFace->createFont());
+ hb_font_t* font = hbFace->getScaledFont();
ASSERT(font);
hb_codepoint_t space;
// If the space glyph isn't present in the font then each space character
// will be rendering using a fallback font, which grantees that it cannot
// affect the shape of the preceding word.
- if (!hb_font_get_glyph(font.get(), spaceCharacter, 0, &space))
+ if (!hb_font_get_glyph(font, spaceCharacter, 0, &space))
return false;
if (!hb_ot_layout_has_substitution(face)
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698