Allow cache tracking to be enabled in release

https://codereview.appspot.com/6500057/



git-svn-id: http://skia.googlecode.com/svn/trunk@5365 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h
index 00e62ea..bfa528d 100644
--- a/src/gpu/GrResourceCache.h
+++ b/src/gpu/GrResourceCache.h
@@ -11,6 +11,7 @@
 #ifndef GrResourceCache_DEFINED
 #define GrResourceCache_DEFINED
 
+#include "GrConfig.h"
 #include "GrTypes.h"
 #include "GrTHashCache.h"
 #include "SkTDLinkedList.h"
@@ -297,11 +298,14 @@
 
 #if GR_DEBUG
     void validate() const;
-    void printStats() const;
 #else
     void validate() const {}
 #endif
 
+#if GR_CACHE_STATS
+    void printStats() const;
+#endif
+
 private:
     void internalDetach(GrResourceEntry*, bool);
     void attachToHead(GrResourceEntry*, bool);
@@ -326,7 +330,7 @@
     size_t fMaxBytes;
 
     // our current stats, related to our budget
-#if GR_DEBUG
+#if GR_CACHE_STATS
     int fHighWaterEntryCount;
     int fHighWaterUnlockedEntryCount;
     size_t fHighWaterEntryBytes;