diff options
author | Chris Craik <ccraik@android.com> | 2014-02-26 11:06:27 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-26 11:06:27 -0800 |
commit | 7b4cce68853d8bcfce2b6bd7f999915063eb56d2 (patch) | |
tree | 7438ebca334a50efe31724f7b60ec3b54d9346cf /libs/hwui/PatchCache.cpp | |
parent | 7fe5978bf7c4b473d8f6db5a12cfdcd110511331 (diff) | |
parent | c3bac8a096cc5661cf91c8c0aa9b7dd0fc099c5d (diff) | |
download | frameworks_base-7b4cce68853d8bcfce2b6bd7f999915063eb56d2.zip frameworks_base-7b4cce68853d8bcfce2b6bd7f999915063eb56d2.tar.gz frameworks_base-7b4cce68853d8bcfce2b6bd7f999915063eb56d2.tar.bz2 |
am c3bac8a0: Merge "Fix graphics corruption caused by HWUI caches"
* commit 'c3bac8a096cc5661cf91c8c0aa9b7dd0fc099c5d':
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 dc0d98c..8a44604 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(); } |