The validation step is adding 50% overhead to the rendering of
text heavy SkPicture files.
Review URL: https://codereview.appspot.com/6856123
git-svn-id: http://skia.googlecode.com/svn/trunk@6635
2bbb7eff-a529-9590-31e7-
b0007b416f81
the performance impact. By default these flags are undefined, but can be
enabled by uncommenting them below.
*/
+//#define SK_DEBUG_GLYPH_CACHE
//#define SK_DEBUG_PATH
/* To assist debugging, Skia provides an instance counting utility in
#ifdef SK_DEBUG
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];
SkASSERT(fImageAlloc.contains(glyph->fImage));
}
}
+#endif
}
#endif