summaryrefslogtreecommitdiffstats
path: root/graphics/jni/android_renderscript_RenderScript.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-11-16 14:04:54 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-16 14:04:54 -0800
commit7b159b4a634a3a2cad6d2a385ae2c4ebf4eb59e0 (patch)
tree2ad07476fe54990fe1ef34884a9eec68ef48adf4 /graphics/jni/android_renderscript_RenderScript.cpp
parenta4cf232df8443fa3f2ef97082bdb0ac2c6dbb308 (diff)
parentec8178eb0fb10e1ed753be4d065cf7f004355575 (diff)
downloadframeworks_base-7b159b4a634a3a2cad6d2a385ae2c4ebf4eb59e0.zip
frameworks_base-7b159b4a634a3a2cad6d2a385ae2c4ebf4eb59e0.tar.gz
frameworks_base-7b159b4a634a3a2cad6d2a385ae2c4ebf4eb59e0.tar.bz2
am ec8178eb: Merge change I9c1bad53 into eclair
Merge commit 'ec8178eb0fb10e1ed753be4d065cf7f004355575' into eclair-plus-aosp * commit 'ec8178eb0fb10e1ed753be4d065cf7f004355575': Add setPriority to allow wallpapers to run at lower cpu priority than default.
Diffstat (limited to 'graphics/jni/android_renderscript_RenderScript.cpp')
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 709cb97..d311c33 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -158,6 +158,16 @@ nContextCreate(JNIEnv *_env, jobject _this, jint dev, jint ver, jboolean useDept
}
static void
+nContextSetPriority(JNIEnv *_env, jobject _this, jint p)
+{
+ RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
+ LOG_API("ContextSetPriority, con(%p), priority(%i)", con, p);
+ rsContextSetPriority(con, p);
+}
+
+
+
+static void
nContextSetSurface(JNIEnv *_env, jobject _this, jint width, jint height, jobject wnd)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
@@ -1333,6 +1343,7 @@ static JNINativeMethod methods[] = {
{"nDeviceDestroy", "(I)V", (void*)nDeviceDestroy },
{"nDeviceSetConfig", "(III)V", (void*)nDeviceSetConfig },
{"nContextCreate", "(IIZ)I", (void*)nContextCreate },
+{"nContextSetPriority", "(I)V", (void*)nContextSetPriority },
{"nContextSetSurface", "(IILandroid/view/Surface;)V", (void*)nContextSetSurface },
{"nContextDestroy", "(I)V", (void*)nContextDestroy },
{"nContextPause", "()V", (void*)nContextPause },