summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-09-09 22:26:58 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-09 22:26:58 -0700
commit319cc55c0288af4cea9b6a9ae1082cf15ed525c1 (patch)
treee52d3913d107edb038c889ba960535533fc1d076 /graphics
parent7da4d0c57a93093c6ad8d68405ddd77a275307ab (diff)
parent9b4489897974db2a7a6d9e19b4de2817bbb4755a (diff)
downloadframeworks_base-319cc55c0288af4cea9b6a9ae1082cf15ed525c1.zip
frameworks_base-319cc55c0288af4cea9b6a9ae1082cf15ed525c1.tar.gz
frameworks_base-319cc55c0288af4cea9b6a9ae1082cf15ed525c1.tar.bz2
am 9b448989: am e3d0f022: Merge "Don\'t set Allocation mSize when we have no Type." into klp-dev
* commit '9b4489897974db2a7a6d9e19b4de2817bbb4755a': Don't set Allocation mSize when we have no Type.
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 {