summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r--graphics/java/android/renderscript/RenderScript.java26
1 files changed, 23 insertions, 3 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 0d9607a49dc0..9941827cb4c4 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
+import android.os.Process;
import android.util.Log;
import android.view.Surface;
@@ -294,6 +295,26 @@ public class RenderScript {
rsnAllocationElementData1D(mContext, id, xoff, mip, compIdx, d, sizeBytes);
}
+ native void rsnAllocationData2D(int con,
+ int dstAlloc, int dstXoff, int dstYoff,
+ int dstMip, int dstFace,
+ int width, int height,
+ int srcAlloc, int srcXoff, int srcYoff,
+ int srcMip, int srcFace);
+ synchronized void nAllocationData2D(int dstAlloc, int dstXoff, int dstYoff,
+ int dstMip, int dstFace,
+ int width, int height,
+ int srcAlloc, int srcXoff, int srcYoff,
+ int srcMip, int srcFace) {
+ validate();
+ rsnAllocationData2D(mContext,
+ dstAlloc, dstXoff, dstYoff,
+ dstMip, dstFace,
+ width, height,
+ srcAlloc, srcXoff, srcYoff,
+ srcMip, srcFace);
+ }
+
native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, int w, int h, byte[] d, int sizeBytes);
synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, int w, int h, byte[] d, int sizeBytes) {
validate();
@@ -718,9 +739,8 @@ public class RenderScript {
* processes.
*/
public enum Priority {
- // Remap these numbers to opaque...
- LOW (5), //ANDROID_PRIORITY_BACKGROUND + 5
- NORMAL (-4); //ANDROID_PRIORITY_DISPLAY
+ LOW (Process.THREAD_PRIORITY_BACKGROUND + (5 * Process.THREAD_PRIORITY_LESS_FAVORABLE)),
+ NORMAL (Process.THREAD_PRIORITY_DISPLAY);
int mID;
Priority(int id) {