Add GrContext API to report the number of purgeable bytes in the cache.

Change-Id: I1457eec9831736f386e3b3b80d9eac8dbb337a9b
Reviewed-on: https://skia-review.googlesource.com/17829
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h
index 71070ee..6362c37 100644
--- a/src/gpu/GrResourceCache.h
+++ b/src/gpu/GrResourceCache.h
@@ -93,6 +93,11 @@
     size_t getResourceBytes() const { return fBytes; }
 
     /**
+     * Returns the number of bytes held by unlocked reosources which are available for purging.
+     */
+    size_t getPurgeableBytes() const { return fPurgeableBytes; }
+
+    /**
      * Returns the number of bytes consumed by budgeted resources.
      */
     size_t getBudgetedResourceBytes() const { return fBudgetedBytes; }
@@ -331,6 +336,7 @@
     // our current stats for resources that count against the budget
     int                                 fBudgetedCount;
     size_t                              fBudgetedBytes;
+    size_t                              fPurgeableBytes;
 
     bool                                fRequestFlush;
     uint32_t                            fExternalFlushCnt;