aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContext.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-21 19:48:32 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-21 19:48:32 +0000
commit8f7e1dac5c92bf1f53feb603a9bd249d53afa81a (patch)
treeb01ea4bb5fbc91efdda37adf5635096f2bd55072 /include/gpu/GrContext.h
parentc778cda14c69d739748839baa053cc0dadad64b6 (diff)
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
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r--include/gpu/GrContext.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 0cd5116cff..9389499ec4 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -83,11 +83,6 @@ public:
*/
void freeGpuResources();
- /**
- * Returns the number of bytes of GPU memory hosted by the texture cache.
- */
- size_t getGpuTextureCacheBytes() const;
-
///////////////////////////////////////////////////////////////////////////
// Textures
@@ -212,25 +207,28 @@ public:
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