diff options
author | Christopher Tate <ctate@google.com> | 2011-11-11 14:28:55 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-11 14:28:55 -0800 |
commit | 951aa9d8ea71082f4ae4c46c41616e79619401fd (patch) | |
tree | 45b8768780ef464d3d94d031fbf6bf273bcad08e /graphics | |
parent | 34059a912520e6c145f18373c4300e4a567da89d (diff) | |
parent | 9acae658e179796beee91d673f9f70af49ae3c9b (diff) | |
download | frameworks_base-951aa9d8ea71082f4ae4c46c41616e79619401fd.zip frameworks_base-951aa9d8ea71082f4ae4c46c41616e79619401fd.tar.gz frameworks_base-951aa9d8ea71082f4ae4c46c41616e79619401fd.tar.bz2 |
am 9acae658: am 847fbbea: Merge "Localized optimizations in views and bitmaps" into ics-mr1
* commit '9acae658e179796beee91d673f9f70af49ae3c9b':
Localized optimizations in views and bitmaps
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/Bitmap.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 79acd55..380b3d8 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -604,10 +604,13 @@ public final class Bitmap implements Parcelable { } Bitmap bm = nativeCreate(null, 0, width, width, height, config.nativeInt, true); if (config == Config.ARGB_8888 && !hasAlpha) { - bm.eraseColor(0xff000000); + nativeErase(bm.mNativeBitmap, 0xff000000); nativeSetHasAlpha(bm.mNativeBitmap, hasAlpha); } else { - bm.eraseColor(0); + // No need to initialize it to zeroes; it is backed by a VM byte array + // which is by definition preinitialized to all zeroes. + // + //nativeErase(bm.mNativeBitmap, 0); } return bm; } |