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

Unified Diff: Source/platform/fonts/skia/SimpleFontDataSkia.cpp

Issue 244253003: SimpleFontData::fillGlyphPage should not set zero for missing glyphs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix expectation Created 6 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
« no previous file with comments | « Source/platform/fonts/mac/SimpleFontDataCoreText.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/skia/SimpleFontDataSkia.cpp
diff --git a/Source/platform/fonts/skia/SimpleFontDataSkia.cpp b/Source/platform/fonts/skia/SimpleFontDataSkia.cpp
index f5a9f95e9832cea118e4a4b9e4965c7bf56a36aa..2ac44c3768002d951d47fee60d77e94d2992863e 100644
--- a/Source/platform/fonts/skia/SimpleFontDataSkia.cpp
+++ b/Source/platform/fonts/skia/SimpleFontDataSkia.cpp
@@ -293,13 +293,15 @@ bool SimpleFontData::fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsig
SkTypeface* typeface = platformData().typeface();
typeface->charsToGlyphs(buffer, SkTypeface::kUTF16_Encoding, glyphs, length);
- unsigned allGlyphs = 0; // track if any of the glyphIDs are non-zero
+ bool haveGlyphs = false;
for (unsigned i = 0; i < length; i++) {
- pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], glyphs[i] ? this : 0);
- allGlyphs |= glyphs[i];
+ if (glyphs[i]) {
+ pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this);
+ haveGlyphs = true;
+ }
}
- return allGlyphs;
+ return haveGlyphs;
}
} // namespace WebCore
« no previous file with comments | « Source/platform/fonts/mac/SimpleFontDataCoreText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698