Remove count budget from resource cache

Review URL: http://codereview.appspot.com/6312052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4287 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 0cd5116..9389499 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -83,11 +83,6 @@
      */
     void freeGpuResources();
 
-    /**
-     * Returns the number of bytes of GPU memory hosted by the texture cache.
-     */
-    size_t getGpuTextureCacheBytes() const;
-
     ///////////////////////////////////////////////////////////////////////////
     // Textures
 
@@ -212,25 +207,28 @@
                                    int height) const;
 
     /**
-     *  Return the current texture cache limits.
-     *
-     *  @param maxTextures If non-null, returns maximum number of textures that
-     *                     can be held in the cache.
-     *  @param maxTextureBytes If non-null, returns maximum number of bytes of
-     *                         texture memory that can be held in the cache.
+     *  Return the current texture cache budget in bytes.
      */
-    void getTextureCacheLimits(int* maxTextures, size_t* maxTextureBytes) const;
+    size_t getTextureCacheBudget() const;
 
     /**
-     *  Specify the texture cache limits. If the current cache exceeds either
-     *  of these, it will be purged (LRU) to keep the cache within these limits.
+     *  Specify the texture cache budget. If the current cache size exceeds the
+     *  budget it will immediately be purged to be within the budget.
      *
-     *  @param maxTextures The maximum number of textures that can be held in
-     *                     the cache.
      *  @param maxTextureBytes The maximum number of bytes of texture memory
      *                         that can be held in the cache.
      */
-    void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes);
+    void setTextureCacheBudget(size_t maxTextureBytes);
+    // DEPRECATED, this will be deleted soon.
+    void setTextureCacheLimits(int ignored, size_t maxTextureBytes) {
+        this->setTextureCacheBudget(maxTextureBytes);
+    }
+
+    /**
+     * Returns the current number of bytes of GPU memory hosted by the texture
+     * cache.
+     */
+    size_t getGpuTextureCacheBytes() const;
 
     /**
      *  Return the max width or height of a texture supported by the current gpu