summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/FileA3D.java
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2013-11-19 12:45:54 -0800
committerTim Murray <timmurray@google.com>2013-11-20 10:18:04 -0800
commit460a04971c494fec39ffcb38e873bb8fdd82d113 (patch)
treeb1567d93e44eec510a0c3adcd9bacd6f2542a860 /graphics/java/android/renderscript/FileA3D.java
parenteff663f391fa4f119685d5c14489b94661ea126f (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/FileA3D.java')
-rw-r--r--graphics/java/android/renderscript/FileA3D.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/graphics/java/android/renderscript/FileA3D.java b/graphics/java/android/renderscript/FileA3D.java
index e41f02d38e2f..cdcaff76b0ec 100644
--- a/graphics/java/android/renderscript/FileA3D.java
+++ b/graphics/java/android/renderscript/FileA3D.java
@@ -80,7 +80,7 @@ public class FileA3D extends BaseObj {
public static class IndexEntry {
RenderScript mRS;
int mIndex;
- int mID;
+ long mID;
String mName;
EntryType mEntryType;
BaseObj mLoadedObj;
@@ -156,7 +156,7 @@ public class FileA3D extends BaseObj {
return entry.mLoadedObj;
}
- IndexEntry(RenderScript rs, int index, int id, String name, EntryType type) {
+ IndexEntry(RenderScript rs, int index, long id, String name, EntryType type) {
mRS = rs;
mIndex = index;
mID = id;
@@ -169,7 +169,7 @@ public class FileA3D extends BaseObj {
IndexEntry[] mFileEntries;
InputStream mInputStream;
- FileA3D(int id, RenderScript rs, InputStream stream) {
+ FileA3D(long id, RenderScript rs, InputStream stream) {
super(id, rs);
mInputStream = stream;
}
@@ -232,7 +232,7 @@ public class FileA3D extends BaseObj {
*/
static public FileA3D createFromAsset(RenderScript rs, AssetManager mgr, String path) {
rs.validate();
- int fileId = rs.nFileA3DCreateFromAsset(mgr, path);
+ long fileId = rs.nFileA3DCreateFromAsset(mgr, path);
if(fileId == 0) {
throw new RSRuntimeException("Unable to create a3d file from asset " + path);
@@ -252,7 +252,7 @@ public class FileA3D extends BaseObj {
* @return a3d file containing renderscript objects
*/
static public FileA3D createFromFile(RenderScript rs, String path) {
- int fileId = rs.nFileA3DCreateFromFile(path);
+ long fileId = rs.nFileA3DCreateFromFile(path);
if(fileId == 0) {
throw new RSRuntimeException("Unable to create a3d file from " + path);
@@ -295,7 +295,7 @@ public class FileA3D extends BaseObj {
throw new RSRuntimeException("Unable to open resource " + id);
}
- int fileId = 0;
+ long fileId = 0;
if (is instanceof AssetManager.AssetInputStream) {
int asset = ((AssetManager.AssetInputStream) is).getAssetInt();
fileId = rs.nFileA3DCreateFromAssetStream(asset);