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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp

Issue 2230233002: Skip redundant fonts returned by FontFallbackIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Logging removed Created 4 years, 4 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/HarfBuzzShaper.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
index 3848a4d2eff8fe3a3128574a4cd0b6004401af49..bca9d48a4e7de172a790c9df410df3cfa26b79ed 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
@@ -496,7 +496,7 @@ static inline const SimpleFontData* fontDataAdjustedForOrientation(const SimpleF
return originalFont;
}
-bool HarfBuzzShaper::collectFallbackHintChars(Vector<UChar32>& hint, bool needsList)
+bool HarfBuzzShaper::collectFallbackHintChars(Vector<UChar32>& hint)
{
if (!m_holesQueue.size())
return false;
@@ -514,8 +514,6 @@ bool HarfBuzzShaper::collectFallbackHintChars(Vector<UChar32>& hint, bool needsL
while (iterator.consume(hintChar)) {
hint.append(hintChar);
numCharsAdded++;
- if (!needsList)
- break;
iterator.advance();
}
}
@@ -599,7 +597,7 @@ PassRefPtr<ShapeResult> HarfBuzzShaper::shapeResult()
// for the shaper and check whether any glyphs were found, or
// define a new API on the shaper which will give us coverage
// information?
- if (!collectFallbackHintChars(fallbackCharsHint, fallbackIterator->needsHintList())) {
+ if (!collectFallbackHintChars(fallbackCharsHint)) {
// Give up shaping since we cannot retrieve a font fallback
// font without a hintlist.
m_holesQueue.clear();

Powered by Google App Engine
This is Rietveld 408576698