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

Commit 04f0d6e3 authored by Tim Murray's avatar Tim Murray
Browse files

Fix getBytesSize for YUV allocations.

bug 12134914

Change-Id: I128e75b756a5bd129077177e254f1db6c94182f1
parent c975437e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -278,6 +278,9 @@ public class Allocation extends BaseObj {
     *
     */
    public int getBytesSize() {
        if (mType.mDimYuv != 0) {
            return (int)Math.ceil(mType.getCount() * mType.getElement().getBytesSize() * 1.5);
        }
        return mType.getCount() * mType.getElement().getBytesSize();
    }