summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorSangkyu Lee <sk82.lee@lge.com>2014-01-09 14:11:57 +0900
committerChris Craik <ccraik@google.com>2014-02-26 10:43:26 -0800
commit36fad8f6fcfbc2087b910600ed5a6f9741177d00 (patch)
tree65bd93bc54c55941cd409d68c8273cd8eb6bc165 /rs/java/android/renderscript/RenderScript.java
parent2ba70fd49bfcbb516e75c198c106764609335feb (diff)
Fix graphics corruption caused by HWUI caches
Some caches(PatchCache, TextureCache, PathCache) for HWUI uses deferred removal for their cache entries even though actual resource objects are immediately freed by ResourceCache. For this reason, the uniqueness of a resource address in the caches is not guaranteed in specific cases. (Because malloc() can return the same address when malloc() and free() called very frequently.) So it can be possible the cache have two cache entries for two different resources but the same memory address. (Of course one of the resources is already freed.) It also can be possible mGarbage vector in PatchCache has duplicated addresses and this can lead to duplicated free blocks in the free block list and graphics corruption. (Deferred removal was implmeneted based on an assumption of unique resource addresses.) So this patch makes sure resource objects are freed after the resources are removed from the caches to guarantee the uniqueness of a resource address and prevent graphics corruption. Change-Id: I040f033a4fc783d2c4bc04b113589657c36fb15b Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
0 files changed, 0 insertions, 0 deletions