diff options
| author | 2017-02-01 22:47:59 +0000 | |
|---|---|---|
| committer | 2017-02-01 22:48:06 +0000 | |
| commit | 2cf7b1f1425819c31a7ccd1c09f5bc9f3ab5c265 (patch) | |
| tree | a2001aeb3c8ffae07055471b328d034d08e9be15 /libs/hwui/TextureCache.cpp | |
| parent | 0fcdf4399e86ea3fb905b1298915afec46fb3be6 (diff) | |
| parent | 83809fec686b47da73ee0aaa80d226de7e33aab9 (diff) | |
Merge "Properly clear textures for Hardware Bitmaps"
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
| -rw-r--r-- | libs/hwui/TextureCache.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index 1aeb8d684a29..63a6a2c8c89c 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -46,7 +46,7 @@ TextureCache::TextureCache() } TextureCache::~TextureCache() { - mCache.clear(); + this->clear(); } /////////////////////////////////////////////////////////////////////////////// @@ -214,6 +214,10 @@ void TextureCache::clearGarbage() { void TextureCache::clear() { mCache.clear(); + for(auto& iter: mHardwareTextures) { + iter.second->deleteTexture(); + } + mHardwareTextures.clear(); TEXTURE_LOGD("TextureCache:clear(), mSize = %d", mSize); } |