Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 319cc55c authored by Stephen Hines's avatar Stephen Hines Committed by Android Git Automerger
Browse files

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

* commit '9b448989':
  Don't set Allocation mSize when we have no Type.
parents 7da4d0c5 9b448989
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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 {