diff options
author | Tim Murray <timmurray@google.com> | 2013-11-19 12:45:54 -0800 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2014-01-31 11:16:09 -0800 |
commit | 7a629fac82f88126642081b4474879f6a883e313 (patch) | |
tree | f14b9b18d27b21fb0eb73ae7ebbcc9b06f1a3661 /graphics/java/android/renderscript/Script.java | |
parent | a78e9adb864e27f54d82f325eb6148302cd03914 (diff) |
Convert Java/JNI to 64-bit, part 2.
This changes BaseObj to support 64-bit IDs. There are a few caveats:
1. Since it is deprecated, RSG will not support 64-bit.
2. Currently, methods that pass arrays of IDs to the driver are not supported in 64-bit. This will be fixed in a later CL.
bug 11332320
Change-Id: If0dbecc8b285e260f767e441e05088b6a1b749a2
Diffstat (limited to 'graphics/java/android/renderscript/Script.java')
-rw-r--r-- | graphics/java/android/renderscript/Script.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/graphics/java/android/renderscript/Script.java b/graphics/java/android/renderscript/Script.java index 0026e0edbfba..5ab18f744c2b 100644 --- a/graphics/java/android/renderscript/Script.java +++ b/graphics/java/android/renderscript/Script.java @@ -36,7 +36,7 @@ public class Script extends BaseObj { Script mScript; int mSlot; int mSig; - KernelID(int id, RenderScript rs, Script s, int slot, int sig) { + KernelID(long id, RenderScript rs, Script s, int slot, int sig) { super(id, rs); mScript = s; mSlot = slot; @@ -54,7 +54,7 @@ public class Script extends BaseObj { return k; } - int id = mRS.nScriptKernelIDCreate(getID(mRS), slot, sig); + long id = mRS.nScriptKernelIDCreate(getID(mRS), slot, sig); if (id == 0) { throw new RSDriverException("Failed to create KernelID"); } @@ -75,7 +75,7 @@ public class Script extends BaseObj { public static final class FieldID extends BaseObj { Script mScript; int mSlot; - FieldID(int id, RenderScript rs, Script s, int slot) { + FieldID(long id, RenderScript rs, Script s, int slot) { super(id, rs); mScript = s; mSlot = slot; @@ -92,7 +92,7 @@ public class Script extends BaseObj { return f; } - int id = mRS.nScriptFieldIDCreate(getID(mRS), slot); + long id = mRS.nScriptFieldIDCreate(getID(mRS), slot); if (id == 0) { throw new RSDriverException("Failed to create FieldID"); } @@ -132,11 +132,11 @@ public class Script extends BaseObj { throw new RSIllegalArgumentException( "At least one of ain or aout is required to be non-null."); } - int in_id = 0; + long in_id = 0; if (ain != null) { in_id = ain.getID(mRS); } - int out_id = 0; + long out_id = 0; if (aout != null) { out_id = aout.getID(mRS); } @@ -161,11 +161,11 @@ public class Script extends BaseObj { forEach(slot, ain, aout, v); return; } - int in_id = 0; + long in_id = 0; if (ain != null) { in_id = ain.getID(mRS); } - int out_id = 0; + long out_id = 0; if (aout != null) { out_id = aout.getID(mRS); } @@ -176,7 +176,7 @@ public class Script extends BaseObj { mRS.nScriptForEachClipped(getID(mRS), slot, in_id, out_id, params, sc.xstart, sc.xend, sc.ystart, sc.yend, sc.zstart, sc.zend); } - Script(int id, RenderScript rs) { + Script(long id, RenderScript rs) { super(id, rs); } |