summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2013-11-06 15:08:07 -0800
committerJason Sams <jsams@google.com>2013-11-11 23:22:53 +0000
commit21659ac4c83d272f3ffd2f9b6333acbe5f0b02a1 (patch)
tree34d75bf3276470de59adaf228807ed4c94cfd223 /graphics/java/android/renderscript/RenderScript.java
parentc2c5689da5c39425c0c9bc44e7d0fcae20b4300f (diff)
Add long/double read support.
Change-Id: I1957f7ac18262a3004a4adcb7c31055212e483c2
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r--graphics/java/android/renderscript/RenderScript.java31
1 files changed, 17 insertions, 14 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index da0cfeb5357c..322a0457a77e 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -425,6 +425,7 @@ public class RenderScript {
validate();
rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID);
}
+
native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, Bitmap b);
synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, Bitmap b) {
validate();
@@ -457,26 +458,28 @@ public class RenderScript {
rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, dt.mID);
}
- native void rsnAllocationRead(int con, int id, byte[] d);
- synchronized void nAllocationRead(int id, byte[] d) {
- validate();
- rsnAllocationRead(mContext, id, d);
- }
- native void rsnAllocationRead(int con, int id, short[] d);
- synchronized void nAllocationRead(int id, short[] d) {
+ native void rsnAllocationRead(int con, int id, Object d, int dt);
+ synchronized void nAllocationRead(int id, Object d, Element.DataType dt) {
validate();
- rsnAllocationRead(mContext, id, d);
+ rsnAllocationRead(mContext, id, d, dt.mID);
}
- native void rsnAllocationRead(int con, int id, int[] d);
- synchronized void nAllocationRead(int id, int[] d) {
+
+ native void rsnAllocationRead1D(int con, int id, int off, int mip, int count, Object d,
+ int sizeBytes, int dt);
+ synchronized void nAllocationRead1D(int id, int off, int mip, int count, Object d,
+ int sizeBytes, Element.DataType dt) {
validate();
- rsnAllocationRead(mContext, id, d);
+ rsnAllocationRead1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID);
}
- native void rsnAllocationRead(int con, int id, float[] d);
- synchronized void nAllocationRead(int id, float[] d) {
+
+ native void rsnAllocationRead2D(int con, int id, int xoff, int yoff, int mip, int face,
+ int w, int h, Object d, int sizeBytes, int dt);
+ synchronized void nAllocationRead2D(int id, int xoff, int yoff, int mip, int face,
+ int w, int h, Object d, int sizeBytes, Element.DataType dt) {
validate();
- rsnAllocationRead(mContext, id, d);
+ rsnAllocationRead2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID);
}
+
native int rsnAllocationGetType(int con, int id);
synchronized int nAllocationGetType(int id) {
validate();