summaryrefslogtreecommitdiff
path: root/libs/rs/rsg_ScriptJavaClass.cpp
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-11-22 20:09:55 -0800
committerXavier Ducrohet <xav@android.com>2010-11-23 11:54:25 -0800
commit2d56b273ef6e2984a4e8914fb67772b173d0a154 (patch)
treea27ae6be789d770986d019795807dfa8df0455a5 /libs/rs/rsg_ScriptJavaClass.cpp
parentb43d7589cf6201fc05f4c9d8b4a0c44d7cdba81e (diff)
Layoutlib: use default nine patch classes.
Move away from using our own implementation of NinePatchDrawable. Now use native delegate for a few methods of NinePatch. The byte[] used to describe the 9-patch chunk is entirely controlled by the delegate. Therefore, while the default version (JNI) use the array as a representation of a C struct, this version uses the array as a serialized version of NinePatchChunk. A cache mechanism using SoftReferences allows us to not deserialize the array every time rendering needs to access the chunk itself. The Bridge-level cache mechanism for bitmaps and nine-patches as changed. Since the new nine-patches doesn't hold the bitmap data anymore (it's stored in a normal Android bitmap which is cached itself through the cache), then the nine-patch cache has been changed to only contain the nine patch chunk. Also initialize the canvas with the display metrics to prepare for correct scaling when density of the assets don't match the target density. Still to come: actual density support in the 9-patch drawing code. Change-Id: Ibefcccf4432e1986e8436e0c41a0107741593536
Diffstat (limited to 'libs/rs/rsg_ScriptJavaClass.cpp')
0 files changed, 0 insertions, 0 deletions