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 |