diff options
Diffstat (limited to 'libs/hwui/TextureCache.h')
| -rw-r--r-- | libs/hwui/TextureCache.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libs/hwui/TextureCache.h b/libs/hwui/TextureCache.h index cf8d134..a2c6380 100644 --- a/libs/hwui/TextureCache.h +++ b/libs/hwui/TextureCache.h @@ -24,11 +24,12 @@ #include <utils/Vector.h> #include "Debug.h" -#include "Texture.h" namespace android { namespace uirenderer { +class Texture; + /////////////////////////////////////////////////////////////////////////////// // Defines /////////////////////////////////////////////////////////////////////////////// @@ -51,17 +52,16 @@ class AssetAtlas; * Any texture added to the cache causing the cache to grow beyond the maximum * allowed size will also cause the oldest texture to be kicked out. */ -class TextureCache: public OnEntryRemoved<uint32_t, Texture*> { +class TextureCache : public OnEntryRemoved<uint32_t, Texture*> { public: TextureCache(); - TextureCache(uint32_t maxByteSize); ~TextureCache(); /** * Used as a callback when an entry is removed from the cache. * Do not invoke directly. */ - void operator()(uint32_t&, Texture*& texture); + void operator()(uint32_t&, Texture*& texture) override; /** * Resets all Textures to not be marked as in use @@ -87,10 +87,10 @@ public: Texture* getTransient(const SkBitmap* bitmap); /** - * Removes the texture associated with the specified bitmap. This is meant + * Removes the texture associated with the specified pixelRef. This is meant * to be called from threads that are not the EGL context thread. */ - void releaseTexture(const SkBitmap* bitmap); + ANDROID_API void releaseTexture(uint32_t pixelRefStableID); /** * Process deferred removals. */ @@ -145,8 +145,6 @@ private: void uploadToTexture(bool resize, GLenum format, GLsizei stride, GLsizei bpp, GLsizei width, GLsizei height, GLenum type, const GLvoid * data); - void init(); - LruCache<uint32_t, Texture*> mCache; uint32_t mSize; |
