diff options
| author | 2017-05-23 18:01:09 +0000 | |
|---|---|---|
| committer | 2017-05-23 18:01:09 +0000 | |
| commit | 45ef07f762575b462b08b7c9ed4a3e80f8a671b6 (patch) | |
| tree | 38bfd79c37d0e1ba120a62d9d849ffa9e6304308 /libs/hwui/TextureCache.h | |
| parent | e82df3f7b6c1784e3ac5e8f2b8d43923fd9bb959 (diff) | |
| parent | 9d08fca62fbe140ffa107dd0f216282971af6748 (diff) | |
Merge "Improve time to texture destruction" into oc-dev am: 1bc0286ef8
am: 9d08fca62f
Change-Id: Iee16d786983734d138a408707cf5efd9f9c9b9fb
Diffstat (limited to 'libs/hwui/TextureCache.h')
| -rw-r--r-- | libs/hwui/TextureCache.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libs/hwui/TextureCache.h b/libs/hwui/TextureCache.h index db4ff39aed83..776ff8a03fd1 100644 --- a/libs/hwui/TextureCache.h +++ b/libs/hwui/TextureCache.h @@ -94,14 +94,10 @@ public: Texture* get(Bitmap* bitmap); /** - * Removes the texture associated with the specified pixelRef. This is meant - * to be called from threads that are not the EGL context thread. + * Removes the texture associated with the specified pixelRef. Must be called from RenderThread + * Returns true if a texture was destroyed, false if no texture with that id was found */ - ANDROID_API void releaseTexture(uint32_t pixelRefStableID); - /** - * Process deferred removals. - */ - void clearGarbage(); + bool destroyTexture(uint32_t pixelRefStableID); /** * Clears the cache. This causes all textures to be deleted. @@ -139,9 +135,7 @@ private: bool mDebugEnabled; - std::vector<uint32_t> mGarbage; std::unordered_map<uint32_t, std::unique_ptr<Texture>> mHardwareTextures; - mutable Mutex mLock; }; // class TextureCache }; // namespace uirenderer |