am e3d0f022: Merge "Don\'t set Allocation mSize when we have no Type." into klp-dev

* commit 'e3d0f022826a2a16e64dc9b5353a2a514393881b':
  Don't set Allocation mSize when we have no Type.
This commit is contained in:
Stephen Hines
2013-09-09 22:25:22 -07:00
committed by Android Git Automerger

View File

@@ -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 {