diff options
author | Alex Sakhartchouk <alexst@google.com> | 2010-08-04 14:45:48 -0700 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2010-08-04 14:45:48 -0700 |
commit | fb10c16a0528a418053e4b8e75eebe57476b86ef (patch) | |
tree | 3a48101a091f1e5b34a3c2dd96d7d01fcfd45635 /graphics/jni | |
parent | cf9a44cdf3647c8b31499ad6250f63259c0e34e2 (diff) | |
download | frameworks_base-fb10c16a0528a418053e4b8e75eebe57476b86ef.zip frameworks_base-fb10c16a0528a418053e4b8e75eebe57476b86ef.tar.gz frameworks_base-fb10c16a0528a418053e4b8e75eebe57476b86ef.tar.bz2 |
Added ability to set font color.
Propagating the name of meshes and allocations from native a3d to java
Change-Id: If781f55340b5369459610e5e92ea69e240dcd24e
Diffstat (limited to 'graphics/jni')
-rw-r--r-- | graphics/jni/android_renderscript_RenderScript.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp index 888c76a..8968dfb 100644 --- a/graphics/jni/android_renderscript_RenderScript.cpp +++ b/graphics/jni/android_renderscript_RenderScript.cpp @@ -104,6 +104,17 @@ nAssignName(JNIEnv *_env, jobject _this, jint obj, jbyteArray str) _env->ReleasePrimitiveArrayCritical(str, cptr, JNI_ABORT); } +static jstring +nGetName(JNIEnv *_env, jobject _this, jint obj) +{ + RsContext con = (RsContext)(_env->GetIntField(_this, gContextId)); + LOG_API("nGetName, con(%p), obj(%p)", con, (void *)obj); + + const char *name = NULL; + rsGetName(con, (void *)obj, &name); + return _env->NewStringUTF(name); +} + static void nObjDestroy(JNIEnv *_env, jobject _this, jint obj) { @@ -1518,6 +1529,7 @@ static JNINativeMethod methods[] = { {"nContextPause", "()V", (void*)nContextPause }, {"nContextResume", "()V", (void*)nContextResume }, {"nAssignName", "(I[B)V", (void*)nAssignName }, +{"nGetName", "(I)Ljava/lang/String;", (void*)nGetName }, {"nObjDestroy", "(I)V", (void*)nObjDestroy }, {"nObjDestroyOOB", "(I)V", (void*)nObjDestroyOOB }, {"nContextGetMessage", "([IZ)I", (void*)nContextGetMessage }, |