aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/gl/GrGpuGL.h2
-rw-r--r--src/gpu/gl/GrGpuGL_program.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index e589ef2a70..e871f220d5 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -24,7 +24,7 @@
#include "GrGLVertexBuffer.h"
#include "../GrTHashCache.h"
-#ifdef SK_DEBUG
+#ifdef SK_DEVELOPER
#define PROGRAM_CACHE_STATS
#endif
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 5081089216..8111a03ca7 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -33,7 +33,8 @@ GrGpuGL::ProgramCache::~ProgramCache() {
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
}