Limit warning message to de-clutter bench output logs
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 27 Sep 2013 21:53:39 +0000 (21:53 +0000)
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 27 Sep 2013 21:53:39 +0000 (21:53 +0000)
https://codereview.chromium.org/25112002/

git-svn-id: http://skia.googlecode.com/svn/trunk@11511 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkTypeface.cpp

index 201d77a..25453f7 100644 (file)
@@ -253,7 +253,12 @@ SkTypeface* SkTypeface::refMatchingStyle(Style style) const {
 
 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]));
     }