summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/Allocation.java
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-07-15 11:33:03 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-07-15 14:02:54 -0700
commitdfac814c18f73dd7289f9927edca3e3b6ec6bc00 (patch)
tree386ca04866a3e7be79ae621582222a8f2b09ceda /graphics/java/android/renderscript/Allocation.java
parent506821b406181ff9b9a10c2fc078d16b79a8cf92 (diff)
Populate java objects with native data from a3d file.
Remove legacy constructor from programraster Make a3d object creation synchronous Change-Id: Ic7d7547cf6eee6f9a7c6e3ee12cd104e80056a7b
Diffstat (limited to 'graphics/java/android/renderscript/Allocation.java')
-rw-r--r--graphics/java/android/renderscript/Allocation.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index bfa61f35cdbe..87735b5856b6 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -45,6 +45,16 @@ public class Allocation extends BaseObj {
mID = id;
}
+ @Override
+ void updateFromNative() {
+ mRS.validate();
+ int typeID = mRS.nAllocationGetType(mID);
+ if(typeID != 0) {
+ mType = new Type(typeID, mRS);
+ mType.updateFromNative();
+ }
+ }
+
public Type getType() {
return mType;
}