From 2222aa90031604e9752ebc2909303a84139b8b18 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Sun, 10 Oct 2010 17:58:25 -0700 Subject: 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 --- graphics/java/android/renderscript/Allocation.java | 29 ---------------------- 1 file changed, 29 deletions(-) (limited to 'graphics/java/android/renderscript/Allocation.java') 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; -- cgit v1.1