This also adds tracking to developer builds.
Author: jvanverth@google.com
Reviewed By: robertphillips@google.com
Review URL: https://chromiumcodereview.appspot.com/
12426019
git-svn-id: http://skia.googlecode.com/svn/trunk@8284
2bbb7eff-a529-9590-31e7-
b0007b416f81
#include "GrGLVertexBuffer.h"
#include "../GrTHashCache.h"
-#ifdef SK_DEBUG
+#ifdef SK_DEVELOPER
#define PROGRAM_CACHE_STATS
#endif
SkDebugf("--- Program Cache ---\n");
SkDebugf("Total requests: %d\n", fTotalRequests);
SkDebugf("Cache misses: %d\n", fCacheMisses);
- SkDebugf("Cache miss %%: %f\n", (float)fCacheMisses/(float)fTotalRequests);
+ SkDebugf("Cache miss %%: %f\n", (fTotalRequests > 0)
+ ? (float)fCacheMisses/(float)fTotalRequests : 0.0f);
SkDebugf("---------------------\n");
#endif
}