diff options
author | Jason Sams <rjsams@android.com> | 2010-12-15 02:12:30 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-15 02:12:30 -0800 |
commit | 06ed40c618cab7028fb870d8b52ba598fa4b3364 (patch) | |
tree | 63388a4497b1e37bb98be1da6aa6e45fa6d1ed2f /src/com/android | |
parent | c3f9f4fcbd3fba3753335d5c9671c0893393b164 (diff) | |
parent | 735a8242471d7535f6d28183eac2cec62a437126 (diff) | |
download | packages_apps_trebuchet-06ed40c618cab7028fb870d8b52ba598fa4b3364.zip packages_apps_trebuchet-06ed40c618cab7028fb870d8b52ba598fa4b3364.tar.gz packages_apps_trebuchet-06ed40c618cab7028fb870d8b52ba598fa4b3364.tar.bz2 |
Merge "Update for Allocation API changes."
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher2/AllApps3D.java | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java index 5d63f5a..5584dcb 100644 --- a/src/com/android/launcher2/AllApps3D.java +++ b/src/com/android/launcher2/AllApps3D.java @@ -1197,14 +1197,11 @@ public class AllApps3D extends RSSurfaceView mScript.set_ROWS_PER_PAGE_LANDSCAPE(Defines.ROWS_PER_PAGE_LANDSCAPE); mHomeButtonNormal = Allocation.createFromBitmapResource(sRS, mRes, - R.drawable.home_button_normal, Element.RGBA_8888(sRS), false); - mHomeButtonNormal.uploadToTexture(0); + R.drawable.home_button_normal); mHomeButtonFocused = Allocation.createFromBitmapResource(sRS, mRes, - R.drawable.home_button_focused, Element.RGBA_8888(sRS), false); - mHomeButtonFocused.uploadToTexture(0); + R.drawable.home_button_focused); mHomeButtonPressed = Allocation.createFromBitmapResource(sRS, mRes, - R.drawable.home_button_pressed, Element.RGBA_8888(sRS), false); - mHomeButtonPressed.uploadToTexture(0); + R.drawable.home_button_pressed); mScript.set_gHomeButton(mHomeButtonNormal); @@ -1240,9 +1237,6 @@ public class AllApps3D extends RSSurfaceView for (int i=0; i < count; i++) { createAppIconAllocations(i, list.get(i)); } - for (int i=0; i < count; i++) { - uploadAppIcon(i, list.get(i)); - } saveAppsList(); android.util.Log.e("rs", "setApps"); sRollo.resume(); @@ -1257,15 +1251,8 @@ public class AllApps3D extends RSSurfaceView } private void createAppIconAllocations(int index, ApplicationInfo item) { - mIcons[index] = Allocation.createFromBitmap(sRS, item.iconBitmap, - Element.RGBA_8888(sRS), false); - mLabels[index] = Allocation.createFromBitmap(sRS, item.titleBitmap, - Element.A_8(sRS), false); - } - - private void uploadAppIcon(int index, ApplicationInfo item) { - mIcons[index].uploadToTexture(true, 0); - mLabels[index].uploadToTexture(true, 0); + mIcons[index] = Allocation.createFromBitmap(sRS, item.iconBitmap); + mLabels[index] = Allocation.createFromBitmap(sRS, item.titleBitmap); } /** @@ -1299,7 +1286,6 @@ public class AllApps3D extends RSSurfaceView System.arraycopy(mLabels, index, mLabels, dest, count); createAppIconAllocations(index, item); - uploadAppIcon(index, item); mScript.set_gIconCount(mScript.get_gIconCount() + 1); } @@ -1395,9 +1381,7 @@ public class AllApps3D extends RSSurfaceView selectionBitmap.getWidth(), selectionBitmap.getHeight(), pressed == SELECTED_PRESSED, info.iconBitmap); - Allocation si = Allocation.createFromBitmap(sRS, selectionBitmap, - Element.RGBA_8888(sRS), false); - si.uploadToTexture(0); + Allocation si = Allocation.createFromBitmap(sRS, selectionBitmap); mScript.set_gSelectedIconTexture(si); if (prev != index) { |