summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2011-01-07 17:00:07 -0800
committerJason Sams <rjsams@android.com>2011-01-07 17:04:29 -0800
commitfa445b9353972735d8d65e8a936786b1afe9886d (patch)
tree0262ad6fe9a936fea749a3203d35849036e27fcb /graphics/java/android/renderscript/RenderScript.java
parente4aff7c6bf0808690ee230cb143ba4394fbc259b (diff)
Cleanup subdata apis
Change-Id: I70d0d5e4ca2b42f3a9cbf854fe47917cee8f46df
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r--graphics/java/android/renderscript/RenderScript.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 665a893b4690..4c9ad569262a 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -60,7 +60,8 @@ public class RenderScript {
_nInit();
sInitialized = true;
} catch (UnsatisfiedLinkError e) {
- Log.d(LOG_TAG, "RenderScript JNI library not found!");
+ Log.e(LOG_TAG, "Error loading RS jni library: " + e);
+ throw new RSRuntimeException("Error loading RS jni library: " + e);
}
}
@@ -250,6 +251,14 @@ public class RenderScript {
rsnAllocationElementData1D(mContext, id, xoff, mip, compIdx, d, sizeBytes);
}
+ 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) {
+ rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes);
+ }
+ native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, int w, int h, short[] d, int sizeBytes);
+ synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, int w, int h, short[] d, int sizeBytes) {
+ rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes);
+ }
native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, int w, int h, int[] d, int sizeBytes);
synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, int w, int h, int[] d, int sizeBytes) {
rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes);
@@ -258,7 +267,19 @@ public class RenderScript {
synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, int w, int h, float[] d, int sizeBytes) {
rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes);
}
+ 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) {
+ rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, b);
+ }
+ native void rsnAllocationRead(int con, int id, byte[] d);
+ synchronized void nAllocationRead(int id, byte[] d) {
+ rsnAllocationRead(mContext, id, d);
+ }
+ native void rsnAllocationRead(int con, int id, short[] d);
+ synchronized void nAllocationRead(int id, short[] d) {
+ rsnAllocationRead(mContext, id, d);
+ }
native void rsnAllocationRead(int con, int id, int[] d);
synchronized void nAllocationRead(int id, int[] d) {
rsnAllocationRead(mContext, id, d);