summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-11-30 10:34:07 -0800
committerRomain Guy <romainguy@google.com>2011-11-30 10:34:07 -0800
commit39fe17c8fb764a9233182cc408e37b1a59182b00 (patch)
treec9cf8ff0ba434a1b85943e17775f20361db9f958 /graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
parent8279acb965abedb5cc1942c399c078eb477cec7a (diff)
Cache drawable constant states instead of drawables
Bug #5678369 Caching drawables directly in a static map was responsible for runtime restarts. If two different UI threads requested the same drawable, the first thread to issue the request would be given a drawable callback belonging to the second thread. This would cause an exception in ViewRootImpl on invalidate. The solution is to store the drawable states and to create a new drawable instance every time a drawable is requested from the cache. This is similar to how preloaded resources are handled. Change-Id: I47e24e2a168cf67a3589185c6cd77b70f9a1c7cf
Diffstat (limited to 'graphics/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions