Limit warning message to de-clutter bench output logs
https://codereview.chromium.org/25112002/
git-svn-id: http://skia.googlecode.com/svn/trunk/src@11511 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/core/SkTypeface.cpp b/core/SkTypeface.cpp
index 201d77a..25453f7 100644
--- a/core/SkTypeface.cpp
+++ b/core/SkTypeface.cpp
@@ -253,7 +253,12 @@
int SkTypeface::onCharsToGlyphs(const void* chars, Encoding encoding,
uint16_t glyphs[], int glyphCount) const {
- SkDebugf("onCharsToGlyphs unimplemented\n");
+ static bool printed = false;
+ if (!printed) {
+ // Only want to see this message once
+ SkDebugf("\n *** onCharsToGlyphs unimplemented ***\n");
+ printed = true;
+ }
if (glyphs && glyphCount > 0) {
sk_bzero(glyphs, glyphCount * sizeof(glyphs[0]));
}