summaryrefslogtreecommitdiffstats
path: root/graphics/jni
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-12-06 15:59:59 -0800
committerJason Sams <rjsams@android.com>2010-12-06 17:46:20 -0800
commitbf6ef8d78fffbce6c1849a4a28fb3f4401ad039e (patch)
tree7bbf2a1d7b8034834e49fa6b636deafcf874d277 /graphics/jni
parent11a8af5ea1e5a760e6d40f025f9cbc356edf1894 (diff)
downloadframeworks_base-bf6ef8d78fffbce6c1849a4a28fb3f4401ad039e.zip
frameworks_base-bf6ef8d78fffbce6c1849a4a28fb3f4401ad039e.tar.gz
frameworks_base-bf6ef8d78fffbce6c1849a4a28fb3f4401ad039e.tar.bz2
API review cleanup.
Change-Id: Ieae7d450308b5637ed4253fe9baed3634c6ed141
Diffstat (limited to 'graphics/jni')
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 6a1a319..c4e0372 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -357,19 +357,13 @@ nElementGetSubElements(JNIEnv *_env, jobject _this, RsContext con, jint id, jint
// -----------------------------------
static int
-nTypeCreate(JNIEnv *_env, jobject _this, RsContext con, RsElement eid, jintArray _dims, jintArray _dimValues)
+nTypeCreate(JNIEnv *_env, jobject _this, RsContext con, RsElement eid,
+ jint dimx, jint dimy, jint dimz, jboolean mips, jboolean faces)
{
- int count = _env->GetArrayLength(_dims);
- LOG_API("nTypeCreate, con(%p)", con);
-
- jint *dimPtr = _env->GetIntArrayElements(_dims, NULL);
- jint *dimValPtr = _env->GetIntArrayElements(_dimValues, NULL);
-
- jint id = (jint)rsaTypeCreate(con, (RsElement)eid, count,
- (RsDimension *)dimPtr, (uint32_t *)dimValPtr);
+ LOG_API("nTypeCreate, con(%p) eid(%p), x(%i), y(%i), z(%i), mips(%i), faces(%i)",
+ con, eid, dimx, dimy, dimz, mips, faces);
- _env->ReleaseIntArrayElements(_dims, dimPtr, JNI_ABORT);
- _env->ReleaseIntArrayElements(_dimValues, dimValPtr, JNI_ABORT);
+ jint id = (jint)rsaTypeCreate(con, (RsElement)eid, dimx, dimy, dimz, mips, faces);
return (jint)id;
}
@@ -1316,7 +1310,7 @@ static JNINativeMethod methods[] = {
{"rsnElementGetNativeData", "(II[I)V", (void*)nElementGetNativeData },
{"rsnElementGetSubElements", "(II[I[Ljava/lang/String;)V", (void*)nElementGetSubElements },
-{"rsnTypeCreate", "(II[I[I)I", (void*)nTypeCreate },
+{"rsnTypeCreate", "(IIIIIZZ)I", (void*)nTypeCreate },
{"rsnTypeGetNativeData", "(II[I)V", (void*)nTypeGetNativeData },
{"rsnAllocationCreateTyped", "(II)I", (void*)nAllocationCreateTyped },