diff options
| author | Jason Sams <rjsams@android.com> | 2010-10-10 17:58:25 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-10-10 17:58:25 -0700 |
| commit | 2222aa90031604e9752ebc2909303a84139b8b18 (patch) | |
| tree | 221332fe04b58b792d1c40cfca730948cf4ccca5 /graphics/java/android/renderscript/Allocation.java | |
| parent | 7499a1ca68ba115efcf53f6a06520c579c44364d (diff) | |
| download | frameworks_base-2222aa90031604e9752ebc2909303a84139b8b18.zip frameworks_base-2222aa90031604e9752ebc2909303a84139b8b18.tar.gz frameworks_base-2222aa90031604e9752ebc2909303a84139b8b18.tar.bz2 | |
Cleanup error message for null binding address.
Only print the debug if script debugging is enabled.
Change-Id: I72b9c2a73d49987a73b354442e9defec02b93bc6
Implement inner utiliy class to specify surface formats.
Remove boxed bitmap upload functions.
Change-Id: I3ff5ca59e53d02b9d75277afa947ea3d218459eb
Diffstat (limited to 'graphics/java/android/renderscript/Allocation.java')
| -rw-r--r-- | graphics/java/android/renderscript/Allocation.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java index 2c076b3..06bfbcf 100644 --- a/graphics/java/android/renderscript/Allocation.java +++ b/graphics/java/android/renderscript/Allocation.java @@ -372,17 +372,6 @@ public class Allocation extends BaseObj { return a; } - static Allocation createFromBitmapBoxed(RenderScript rs, Bitmap b, Element dstFmt, boolean genMips) - throws IllegalArgumentException { - - rs.validate(); - int id = rs.nAllocationCreateFromBitmapBoxed(dstFmt.mID, genMips, b); - if(id == 0) { - throw new IllegalStateException("Load failed."); - } - return new Allocation(id, rs, null); - } - static public Allocation createFromBitmapResource(RenderScript rs, Resources res, int id, Element dstFmt, boolean genMips) throws IllegalArgumentException { @@ -415,24 +404,6 @@ public class Allocation extends BaseObj { return null; } - static public Allocation createFromBitmapResourceBoxed(RenderScript rs, Resources res, int id, Element dstFmt, boolean genMips) - throws IllegalArgumentException { - - mBitmapOptions.inPreferredConfig = null; - if (dstFmt == rs.mElement_RGBA_8888) { - mBitmapOptions.inPreferredConfig = Bitmap.Config.ARGB_8888; - } else if (dstFmt == rs.mElement_RGB_888) { - mBitmapOptions.inPreferredConfig = Bitmap.Config.ARGB_8888; - } else if (dstFmt == rs.mElement_RGBA_4444) { - mBitmapOptions.inPreferredConfig = Bitmap.Config.ARGB_4444; - } else if (dstFmt == rs.mElement_RGB_565) { - mBitmapOptions.inPreferredConfig = Bitmap.Config.RGB_565; - } - - Bitmap b = BitmapFactory.decodeResource(res, id, mBitmapOptions); - return createFromBitmapBoxed(rs, b, dstFmt, genMips); - } - static public Allocation createFromString(RenderScript rs, String str) throws IllegalArgumentException { byte[] allocArray = null; |
