diff options
author | Jason Sams <rjsams@android.com> | 2010-12-14 19:24:21 -0800 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-12-14 19:24:21 -0800 |
commit | 735a8242471d7535f6d28183eac2cec62a437126 (patch) | |
tree | ee20b6292b531d125f8cba0eda87cf969d2ab15a /src/com | |
parent | 4c4b20f7c356774995f117e3322e7ab5fc0f10f0 (diff) | |
download | packages_apps_trebuchet-735a8242471d7535f6d28183eac2cec62a437126.zip packages_apps_trebuchet-735a8242471d7535f6d28183eac2cec62a437126.tar.gz packages_apps_trebuchet-735a8242471d7535f6d28183eac2cec62a437126.tar.bz2 |
Update for Allocation API changes.
Change-Id: I46bbeab13df570fd14a21c4a2790adc9665dca26
Diffstat (limited to 'src/com')
-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) { |