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/Element.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/Element.java')
-rw-r--r-- | graphics/java/android/renderscript/Element.java | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/graphics/java/android/renderscript/Element.java b/graphics/java/android/renderscript/Element.java index 7b155fe..f801794 100644 --- a/graphics/java/android/renderscript/Element.java +++ b/graphics/java/android/renderscript/Element.java @@ -315,29 +315,6 @@ public class Element extends BaseObj { super.destroy(); } - public static Element createFromClass(RenderScript rs, Class c) { - rs.validate(); - Field[] fields = c.getFields(); - Builder b = new Builder(rs); - - for(Field f: fields) { - Class fc = f.getType(); - if(fc == int.class) { - b.add(createUser(rs, DataType.SIGNED_32), f.getName()); - } else if(fc == short.class) { - b.add(createUser(rs, DataType.SIGNED_16), f.getName()); - } else if(fc == byte.class) { - b.add(createUser(rs, DataType.SIGNED_8), f.getName()); - } else if(fc == float.class) { - b.add(createUser(rs, DataType.FLOAT_32), f.getName()); - } else { - throw new IllegalArgumentException("Unkown field type"); - } - } - return b.create(); - } - - ///////////////////////////////////////// public static Element createUser(RenderScript rs, DataType dt) { return new Element(rs, dt, DataKind.USER, false, 1); |