summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-09-10 05:23:10 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-10 05:23:15 +0000
commite3d0f022826a2a16e64dc9b5353a2a514393881b (patch)
treeb824856d1031967e15049caa65ad885fa76d9ea8 /graphics
parent5f5e84770badd10c41fd4a2b01a9958a607eacd9 (diff)
parent88990da58d0231b5a1b9a27b32c37839e95c7487 (diff)
downloadframeworks_base-e3d0f022826a2a16e64dc9b5353a2a514393881b.zip
frameworks_base-e3d0f022826a2a16e64dc9b5353a2a514393881b.tar.gz
frameworks_base-e3d0f022826a2a16e64dc9b5353a2a514393881b.tar.bz2
Merge "Don't set Allocation mSize when we have no Type." into klp-dev
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/renderscript/Allocation.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index ca72c25..dca934f 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -269,9 +269,12 @@ public class Allocation extends BaseObj {
mType = t;
mUsage = usage;
- mSize = mType.getCount() * mType.getElement().getBytesSize();
if (t != null) {
+ // TODO: A3D doesn't have Type info during creation, so we can't
+ // calculate the size ahead of time. We can possibly add a method
+ // to update the size in the future if it seems reasonable.
+ mSize = mType.getCount() * mType.getElement().getBytesSize();
updateCacheInfo(t);
}
try {