aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContext.h
diff options
context:
space:
mode:
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