Fix bit rot in SkGlyphCache validate code.

TESTED
CFLAGS=-DSK_DEBUG_GLYPH_CACHE CPPFLAGS=-DSK_DEBUG_GLYPH_CACHE ./gyp_skia

ninja -C out/Debug dm
out/Debug/dm

Review URL: https://codereview.chromium.org/989683002
This commit is contained in:
herb 2015-03-06 16:15:23 -08:00 committed by Commit bot
parent 5a8f2257b0
commit c2ff52920b

View File

@ -662,15 +662,11 @@ void SkGlyphCache::validate() const {
#ifdef SK_DEBUG_GLYPH_CACHE
int count = fGlyphArray.count();
for (int i = 0; i < count; i++) {
const SkGlyph* glyph = fGlyphArray[i];
const SkGlyph* glyph = &fGlyphArray[i];
SkASSERT(glyph);
SkASSERT(fGlyphAlloc.contains(glyph));
if (glyph->fImage) {
SkASSERT(fGlyphAlloc.contains(glyph->fImage));
}
if (glyph->fDistanceField) {
SkASSERT(fGlyphAlloc.contains(glyph->fDistanceField));
}
}
#endif
}