diff options
author | Jason Sams <rjsams@android.com> | 2009-11-16 14:04:54 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-16 14:04:54 -0800 |
commit | 7b159b4a634a3a2cad6d2a385ae2c4ebf4eb59e0 (patch) | |
tree | 2ad07476fe54990fe1ef34884a9eec68ef48adf4 /graphics/java | |
parent | a4cf232df8443fa3f2ef97082bdb0ac2c6dbb308 (diff) | |
parent | ec8178eb0fb10e1ed753be4d065cf7f004355575 (diff) | |
download | frameworks_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/java')
-rw-r--r-- | graphics/java/android/renderscript/RenderScript.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index ea11882..a5bceb6 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -67,6 +67,7 @@ public class RenderScript { native int nContextCreate(int dev, int ver, boolean useDepth); native void nContextDestroy(int con); native void nContextSetSurface(int w, int h, Surface sur); + native void nContextSetPriority(int p); native void nContextBindRootScript(int script); native void nContextBindSampler(int sampler, int slot); @@ -218,6 +219,7 @@ public class RenderScript { Element mElement_XY_F32; Element mElement_XYZ_F32; + /////////////////////////////////////////////////////////////////////////////////// // @@ -229,6 +231,20 @@ public class RenderScript { } public RSMessage mMessageCallback = null; + public enum Priority { + LOW (5), //ANDROID_PRIORITY_BACKGROUND + 5 + NORMAL (-4); //ANDROID_PRIORITY_DISPLAY + + int mID; + Priority(int id) { + mID = id; + } + } + + public void contextSetPriority(Priority p) { + nContextSetPriority(p.mID); + } + private static class MessageThread extends Thread { RenderScript mRS; boolean mRun = true; |