diff options
| author | 2014-02-26 19:14:32 +0000 | |
|---|---|---|
| committer | 2014-02-26 19:14:32 +0000 | |
| commit | 328b7ee6a2ba2dc8f162fa57dbafd4bfc89bb72e (patch) | |
| tree | ca447ed35138f9dcfc10cbb4e2a47e2057175225 /libs/hwui/PatchCache.cpp | |
| parent | 97686e00233f6475bd4a5a48bc718fcf88bbf688 (diff) | |
| parent | aecb8c43d0c6c3d2b55f88abeaa0e3197be59301 (diff) | |
am aecb8c43: am 7b4cce68: am c3bac8a0: Merge "Fix graphics corruption caused by HWUI caches"
* commit 'aecb8c43d0c6c3d2b55f88abeaa0e3197be59301':
Fix graphics corruption caused by HWUI caches
Diffstat (limited to 'libs/hwui/PatchCache.cpp')
| -rw-r--r-- | libs/hwui/PatchCache.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/hwui/PatchCache.cpp b/libs/hwui/PatchCache.cpp index dc0d98c2cb8d..8a446043b70f 100644 --- a/libs/hwui/PatchCache.cpp +++ b/libs/hwui/PatchCache.cpp @@ -129,7 +129,11 @@ void PatchCache::clearGarbage() { Mutex::Autolock _l(mLock); size_t count = mGarbage.size(); for (size_t i = 0; i < count; i++) { - remove(patchesToRemove, mGarbage[i]); + Res_png_9patch* patch = mGarbage[i]; + remove(patchesToRemove, patch); + // A Res_png_9patch is actually an array of byte that's larger + // than sizeof(Res_png_9patch). It must be freed as an array. + delete[] (int8_t*) patch; } mGarbage.clear(); } |