Index: src/gpu/gl/GrGpuGL_program.cpp |
=================================================================== |
--- src/gpu/gl/GrGpuGL_program.cpp (revision 8271) |
+++ src/gpu/gl/GrGpuGL_program.cpp (working copy) |
@@ -33,7 +33,8 @@ |
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 |
} |