diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2011-05-04 17:45:36 -0700 |
|---|---|---|
| committer | Alex Sakhartchouk <alexst@google.com> | 2011-05-04 17:45:36 -0700 |
| commit | a89094aa3bc059c6e03b20b4c5b1ede4582f3da9 (patch) | |
| tree | 442bc6fadbe5714d462fd8474b59057b5ab78c26 /graphics/jni | |
| parent | 523ca2ba6de61306b3d3e62000e0e8c9f7edec3a (diff) | |
| download | frameworks_base-a89094aa3bc059c6e03b20b4c5b1ede4582f3da9.zip frameworks_base-a89094aa3bc059c6e03b20b4c5b1ede4582f3da9.tar.gz frameworks_base-a89094aa3bc059c6e03b20b4c5b1ede4582f3da9.tar.bz2 | |
Code Cleanup and better Sampler creation method
Change-Id: I9e35081ee6034cb619f43a47f8f22f38977f5d12
Diffstat (limited to 'graphics/jni')
| -rw-r--r-- | graphics/jni/android_renderscript_RenderScript.cpp | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp index 256435f..445f4b5 100644 --- a/graphics/jni/android_renderscript_RenderScript.cpp +++ b/graphics/jni/android_renderscript_RenderScript.cpp @@ -1059,32 +1059,18 @@ nContextBindProgramRaster(JNIEnv *_env, jobject _this, RsContext con, jint pf) // --------------------------------------------------------------------------- -static void -nSamplerBegin(JNIEnv *_env, jobject _this, RsContext con) -{ - LOG_API("nSamplerBegin, con(%p)", con); - rsSamplerBegin(con); -} - -static void -nSamplerSet(JNIEnv *_env, jobject _this, RsContext con, jint p, jint v) -{ - LOG_API("nSamplerSet, con(%p), param(%i), value(%i)", con, p, v); - rsSamplerSet(con, (RsSamplerParam)p, (RsSamplerValue)v); -} - -static void -nSamplerSet2(JNIEnv *_env, jobject _this, RsContext con, jint p, jfloat v) -{ - LOG_API("nSamplerSet2, con(%p), param(%i), value(%f)", con, p, v); - rsSamplerSet2(con, (RsSamplerParam)p, v); -} - static jint -nSamplerCreate(JNIEnv *_env, jobject _this, RsContext con) +nSamplerCreate(JNIEnv *_env, jobject _this, RsContext con, jint magFilter, jint minFilter, + jint wrapS, jint wrapT, jint wrapR, jfloat aniso) { LOG_API("nSamplerCreate, con(%p)", con); - return (jint)rsSamplerCreate(con); + return (jint)rsSamplerCreate(con, + (RsSamplerValue)magFilter, + (RsSamplerValue)minFilter, + (RsSamplerValue)wrapS, + (RsSamplerValue)wrapT, + (RsSamplerValue)wrapR, + aniso); } // --------------------------------------------------------------------------- @@ -1280,10 +1266,7 @@ static JNINativeMethod methods[] = { {"rsnContextBindProgramVertex", "(II)V", (void*)nContextBindProgramVertex }, {"rsnContextBindProgramRaster", "(II)V", (void*)nContextBindProgramRaster }, -{"rsnSamplerBegin", "(I)V", (void*)nSamplerBegin }, -{"rsnSamplerSet", "(III)V", (void*)nSamplerSet }, -{"rsnSamplerSet2", "(IIF)V", (void*)nSamplerSet2 }, -{"rsnSamplerCreate", "(I)I", (void*)nSamplerCreate }, +{"rsnSamplerCreate", "(IIIIIIF)I", (void*)nSamplerCreate }, {"rsnMeshCreate", "(III)I", (void*)nMeshCreate }, {"rsnMeshBindVertex", "(IIII)V", (void*)nMeshBindVertex }, |
