summaryrefslogtreecommitdiffstats
path: root/graphics/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-08-18 14:14:24 -0700
committerJason Sams <rjsams@android.com>2009-08-18 14:20:07 -0700
commit7ce033d797e5df5e2131e2ed459fba181eaf4658 (patch)
treec4bf9fd7d74260b800b75786a2adbca04d2f71be /graphics/java/android/renderscript/RenderScript.java
parent48134b78d53eca2a0a71799b0901aba5997f2eba (diff)
downloadframeworks_base-7ce033d797e5df5e2131e2ed459fba181eaf4658.zip
frameworks_base-7ce033d797e5df5e2131e2ed459fba181eaf4658.tar.gz
frameworks_base-7ce033d797e5df5e2131e2ed459fba181eaf4658.tar.bz2
Cleanup of object destruction. No need to have a per-class destruction function. This was a legacy of the distant past when the classes did not have a common base.
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r--graphics/java/android/renderscript/RenderScript.java25
1 files changed, 1 insertions, 24 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index ab263ed..08418c6 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -74,6 +74,7 @@ public class RenderScript {
native void nContextAddDefineF(String name, float value);
native void nAssignName(int obj, byte[] name);
+ native void nObjDestroy(int id);
native int nFileOpen(byte[] name);
native void nElementBegin();
@@ -81,12 +82,10 @@ public class RenderScript {
native void nElementAdd(int kind, int type, int norm, int bits, String s);
native int nElementCreate();
native int nElementGetPredefined(int predef);
- native void nElementDestroy(int obj);
native void nTypeBegin(int elementID);
native void nTypeAdd(int dim, int val);
native int nTypeCreate();
- native void nTypeDestroy(int id);
native void nTypeFinalDestroy(Type t);
native void nTypeSetupFields(Type t, int[] types, int[] bits, Field[] IDs);
@@ -97,7 +96,6 @@ public class RenderScript {
native int nAllocationCreateFromBitmapBoxed(int dstFmt, boolean genMips, Bitmap bmp);
native void nAllocationUploadToTexture(int alloc, int baseMioLevel);
- native void nAllocationDestroy(int alloc);
native void nAllocationData(int id, int[] d);
native void nAllocationData(int id, float[] d);
native void nAllocationSubData1D(int id, int off, int count, int[] d);
@@ -108,7 +106,6 @@ public class RenderScript {
native void nAllocationRead(int id, float[] d);
native void nAllocationDataFromObject(int id, Type t, Object o);
- native void nTriangleMeshDestroy(int id);
native void nTriangleMeshBegin(int vertex, int index);
native void nTriangleMeshAddVertex_XY (float x, float y);
native void nTriangleMeshAddVertex_XYZ (float x, float y, float z);
@@ -118,7 +115,6 @@ public class RenderScript {
native void nTriangleMeshAddTriangle(int i1, int i2, int i3);
native int nTriangleMeshCreate();
- native void nAdapter1DDestroy(int id);
native void nAdapter1DBindAllocation(int ad, int alloc);
native void nAdapter1DSetConstraint(int ad, int dim, int value);
native void nAdapter1DData(int ad, int[] d);
@@ -127,7 +123,6 @@ public class RenderScript {
native void nAdapter1DSubData(int ad, int off, int count, float[] d);
native int nAdapter1DCreate();
- native void nAdapter2DDestroy(int id);
native void nAdapter2DBindAllocation(int ad, int alloc);
native void nAdapter2DSetConstraint(int ad, int dim, int value);
native void nAdapter2DData(int ad, int[] d);
@@ -136,7 +131,6 @@ public class RenderScript {
native void nAdapter2DSubData(int ad, int xoff, int yoff, int w, int h, float[] d);
native int nAdapter2DCreate();
- native void nScriptDestroy(int script);
native void nScriptBindAllocation(int script, int alloc, int slot);
native void nScriptSetClearColor(int script, float r, float g, float b, float a);
native void nScriptSetClearDepth(int script, float depth);
@@ -151,7 +145,6 @@ public class RenderScript {
native void nScriptCAddDefineI32(String name, int value);
native void nScriptCAddDefineF(String name, float value);
- native void nSamplerDestroy(int sampler);
native void nSamplerBegin();
native void nSamplerSet(int param, int value);
native int nSamplerCreate();
@@ -163,7 +156,6 @@ public class RenderScript {
native void nProgramFragmentStoreBlendFunc(int src, int dst);
native void nProgramFragmentStoreDither(boolean enable);
native int nProgramFragmentStoreCreate();
- native void nProgramFragmentStoreDestroy(int pgm);
native void nProgramFragmentBegin(int in, int out);
native void nProgramFragmentBindTexture(int vpf, int slot, int a);
@@ -172,9 +164,7 @@ public class RenderScript {
native void nProgramFragmentSetEnvMode(int slot, int env);
native void nProgramFragmentSetTexEnable(int slot, boolean enable);
native int nProgramFragmentCreate();
- native void nProgramFragmentDestroy(int pgm);
- native void nProgramVertexDestroy(int pv);
native void nProgramVertexBindAllocation(int pv, int mID);
native void nProgramVertexBegin(int inID, int outID);
native void nProgramVertexSetTextureMatrixEnable(boolean enable);
@@ -185,16 +175,13 @@ public class RenderScript {
native void nLightSetIsMono(boolean isMono);
native void nLightSetIsLocal(boolean isLocal);
native int nLightCreate();
- native void nLightDestroy(int l);
native void nLightSetColor(int l, float r, float g, float b);
native void nLightSetPosition(int l, float x, float y, float z);
- native void nSimpleMeshDestroy(int id);
native int nSimpleMeshCreate(int batchID, int idxID, int[] vtxID, int prim);
native void nSimpleMeshBindVertex(int id, int alloc, int slot);
native void nSimpleMeshBindIndex(int id, int alloc);
- native void nAnimationDestroy(int id);
native void nAnimationBegin(int attribCount, int keyframeCount);
native void nAnimationAdd(float time, float[] attribs);
native int nAnimationCreate();
@@ -229,11 +216,6 @@ public class RenderScript {
super(RenderScript.this);
mID = id;
}
-
- public void destroy() {
- nTriangleMeshDestroy(mID);
- mID = 0;
- }
}
public void triangleMeshBegin(Element vertex, Element index) {
@@ -278,11 +260,6 @@ public class RenderScript {
super(RenderScript.this);
mID = id;
}
-
- public void destroy() {
- //nLightDestroy(mID);
- mID = 0;
- }
}
public File fileOpen(String s) throws IllegalStateException, IllegalArgumentException