Limit warning message to de-clutter bench output logs

https://codereview.chromium.org/25112002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11511 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2013-09-27 21:53:39 +00:00
parent ea493b3c77
commit 6e7883b84f

View 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]));
}