summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-08-05 13:57:03 -0700
committerJason Sams <rjsams@android.com>2009-08-05 13:57:03 -0700
commit9bee51c42eb8c3daffe7d6fa483edbb1689b94d2 (patch)
treeed0f12b149a98299f205173a5563c42599426fe3 /graphics
parent9d1a3149f35b716caeda89dad53c0d8c45c6ca4b (diff)
downloadframeworks_base-9bee51c42eb8c3daffe7d6fa483edbb1689b94d2.zip
frameworks_base-9bee51c42eb8c3daffe7d6fa483edbb1689b94d2.tar.gz
frameworks_base-9bee51c42eb8c3daffe7d6fa483edbb1689b94d2.tar.bz2
Remove useless slot from ProgramVertex. Optimize GL state setup.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/renderscript/ProgramVertex.java4
-rw-r--r--graphics/java/android/renderscript/RenderScript.java3
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp15
3 files changed, 6 insertions, 16 deletions
diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java
index a6fdf1f..c4f7759 100644
--- a/graphics/java/android/renderscript/ProgramVertex.java
+++ b/graphics/java/android/renderscript/ProgramVertex.java
@@ -38,8 +38,8 @@ public class ProgramVertex extends BaseObj {
mID = 0;
}
- public void bindAllocation(int slot, MatrixAllocation va) {
- mRS.nProgramVertexBindAllocation(mID, slot, va.mAlloc.mID);
+ public void bindAllocation(MatrixAllocation va) {
+ mRS.nProgramVertexBindAllocation(mID, va.mAlloc.mID);
}
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 5fb7f08..0fb450e 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -164,9 +164,8 @@ public class RenderScript {
native void nProgramFragmentDestroy(int pgm);
native void nProgramVertexDestroy(int pv);
- native void nProgramVertexBindAllocation(int pv, int slot, int mID);
+ native void nProgramVertexBindAllocation(int pv, int mID);
native void nProgramVertexBegin(int inID, int outID);
- native void nProgramVertexSetType(int slot, int mID);
native void nProgramVertexSetTextureMatrixEnable(boolean enable);
native void nProgramVertexAddLight(int id);
native int nProgramVertexCreate();
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 73380b8..e2a8a27 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -909,19 +909,11 @@ nProgramVertexBegin(JNIEnv *_env, jobject _this, jint in, jint out)
}
static void
-nProgramVertexBindAllocation(JNIEnv *_env, jobject _this, jint vpv, jint slot, jint a)
+nProgramVertexBindAllocation(JNIEnv *_env, jobject _this, jint vpv, jint a)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
LOG_API("nProgramVertexBindAllocation, con(%p), vpf(%p), slot(%i), a(%p)", con, (RsProgramVertex)vpv, slot, (RsAllocation)a);
- rsProgramVertexBindAllocation((RsProgramFragment)vpv, slot, (RsAllocation)a);
-}
-
-static void
-nProgramVertexSetType(JNIEnv *_env, jobject _this, jint slot, jint t)
-{
- RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nProgramVertexSetType, con(%p), vpf(%p), slot(%i), a(%p)", con, (RsProgramVertex)vpv, slot, (RsType)t);
- rsProgramVertexSetType(slot, (RsType)t);
+ rsProgramVertexBindAllocation((RsProgramFragment)vpv, (RsAllocation)a);
}
static void
@@ -1186,9 +1178,8 @@ static JNINativeMethod methods[] = {
{"nProgramFragmentDestroy", "(I)V", (void*)nProgramFragmentDestroy },
{"nProgramVertexDestroy", "(I)V", (void*)nProgramVertexDestroy },
-{"nProgramVertexBindAllocation", "(III)V", (void*)nProgramVertexBindAllocation },
+{"nProgramVertexBindAllocation", "(II)V", (void*)nProgramVertexBindAllocation },
{"nProgramVertexBegin", "(II)V", (void*)nProgramVertexBegin },
-{"nProgramVertexSetType", "(II)V", (void*)nProgramVertexSetType },
{"nProgramVertexSetTextureMatrixEnable", "(Z)V", (void*)nProgramVertexSetTextureMatrixEnable },
{"nProgramVertexAddLight", "(I)V", (void*)nProgramVertexAddLight },
{"nProgramVertexCreate", "()I", (void*)nProgramVertexCreate },