diff options
Diffstat (limited to 'libs/hwui/TextureCache.h')
-rw-r--r-- | libs/hwui/TextureCache.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/TextureCache.h b/libs/hwui/TextureCache.h index f7707f7..ce924b4 100644 --- a/libs/hwui/TextureCache.h +++ b/libs/hwui/TextureCache.h @@ -98,6 +98,17 @@ public: */ uint32_t getSize(); + /** + * Partially flushes the cache. The amount of memory freed by a flush + * is defined by the flush rate. + */ + void flush(); + /** + * Indicates the percentage of the cache to retain when a + * memory trim is requested (see Caches::flush). + */ + void setFlushRate(float flushRate); + private: /** * Generates the texture from a bitmap into the specified texture structure. @@ -119,6 +130,8 @@ private: uint32_t mMaxSize; GLint mMaxTextureSize; + float mFlushRate; + bool mDebugEnabled; Vector<SkBitmap*> mGarbage; |