diff options
author | Jason Sams <rjsams@android.com> | 2009-09-24 17:38:20 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-09-24 17:38:20 -0700 |
commit | 65e7aa56f56097418d617663683544c25b3988ea (patch) | |
tree | b115e9b8c4467141b3e99e1afb6159e0d964fb84 /graphics/jni | |
parent | 0d3999f788eb01baa8ba671878387761cbbbf861 (diff) | |
download | frameworks_base-65e7aa56f56097418d617663683544c25b3988ea.zip frameworks_base-65e7aa56f56097418d617663683544c25b3988ea.tar.gz frameworks_base-65e7aa56f56097418d617663683544c25b3988ea.tar.bz2 |
Implement pause/resume for the RS thread.
Diffstat (limited to 'graphics/jni')
-rw-r--r-- | graphics/jni/android_renderscript_RenderScript.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp index f86d86a..9054b65 100644 --- a/graphics/jni/android_renderscript_RenderScript.cpp +++ b/graphics/jni/android_renderscript_RenderScript.cpp @@ -179,6 +179,22 @@ nContextDestroy(JNIEnv *_env, jobject _this, jint con) static void +nContextPause(JNIEnv *_env, jobject _this) +{ + RsContext con = (RsContext)(_env->GetIntField(_this, gContextId)); + LOG_API("nContextPause, con(%p)", con); + rsContextPause(con); +} + +static void +nContextResume(JNIEnv *_env, jobject _this) +{ + RsContext con = (RsContext)(_env->GetIntField(_this, gContextId)); + LOG_API("nContextResume, con(%p)", con); + rsContextResume(con); +} + +static void nElementBegin(JNIEnv *_env, jobject _this) { RsContext con = (RsContext)(_env->GetIntField(_this, gContextId)); @@ -1282,6 +1298,8 @@ static JNINativeMethod methods[] = { {"nDeviceSetConfig", "(III)V", (void*)nDeviceSetConfig }, {"nContextCreate", "(ILandroid/view/Surface;IZ)I", (void*)nContextCreate }, {"nContextDestroy", "(I)V", (void*)nContextDestroy }, +{"nContextPause", "()V", (void*)nContextPause }, +{"nContextResume", "()V", (void*)nContextResume }, {"nAssignName", "(I[B)V", (void*)nAssignName }, {"nObjDestroy", "(I)V", (void*)nObjDestroy }, {"nObjDestroyOOB", "(I)V", (void*)nObjDestroyOOB }, |