diff options
author | Jason Sams <rjsams@android.com> | 2010-05-14 16:29:20 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-05-14 16:29:20 -0700 |
commit | b42315d37ab22e64ef88d3aed38ed75fd7071eed (patch) | |
tree | 83bf21d63651d54b4c30bfa6badbd854d000460e /graphics/java/android/renderscript/Type.java | |
parent | f603d212552485c634e25f3556f847dc2b022bd5 (diff) | |
download | frameworks_base-b42315d37ab22e64ef88d3aed38ed75fd7071eed.zip frameworks_base-b42315d37ab22e64ef88d3aed38ed75fd7071eed.tar.gz frameworks_base-b42315d37ab22e64ef88d3aed38ed75fd7071eed.tar.bz2 |
Delete old createFromClass methods.
It no longer makes sense to create type info from Java since this
cannot be exported to scripts. The new flow is in the opposite direction.
Change-Id: I9b46e3f57abf84c01326bd9b9b834f3ff0f7c504
Diffstat (limited to 'graphics/java/android/renderscript/Type.java')
-rw-r--r-- | graphics/java/android/renderscript/Type.java | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/graphics/java/android/renderscript/Type.java b/graphics/java/android/renderscript/Type.java index 62d3867..14422b2 100644 --- a/graphics/java/android/renderscript/Type.java +++ b/graphics/java/android/renderscript/Type.java @@ -108,48 +108,9 @@ public class Type extends BaseObj { super.finalize(); } - public static Type createFromClass(RenderScript rs, Class c, int size) { - Element e = Element.createFromClass(rs, c); - Builder b = new Builder(rs, e); - b.add(Dimension.X, size); - Type t = b.create(); - e.destroy(); - - // native fields - { - Field[] fields = c.getFields(); - int[] arTypes = new int[fields.length]; - int[] arBits = new int[fields.length]; - - for(int ct=0; ct < fields.length; ct++) { - Field f = fields[ct]; - Class fc = f.getType(); - if(fc == int.class) { - arTypes[ct] = Element.DataType.SIGNED_32.mID; - arBits[ct] = 32; - } else if(fc == short.class) { - arTypes[ct] = Element.DataType.SIGNED_16.mID; - arBits[ct] = 16; - } else if(fc == byte.class) { - arTypes[ct] = Element.DataType.SIGNED_8.mID; - arBits[ct] = 8; - } else if(fc == float.class) { - arTypes[ct] = Element.DataType.FLOAT_32.mID; - arBits[ct] = 32; - } else { - throw new IllegalArgumentException("Unkown field type"); - } - } - rs.nTypeSetupFields(t, arTypes, arBits, fields); - } - t.mJavaClass = c; - return t; - } - public static Type createFromClass(RenderScript rs, Class c, int size, String scriptName) { - Type t = createFromClass(rs, c, size); - t.setName(scriptName); - return t; + android.util.Log.e("RenderScript", "Calling depricated createFromClass"); + return null; } |