Merge "Fix getBytesSize for YUV allocations."

This commit is contained in:
Tim Murray
2014-02-03 22:36:53 +00:00
committed by Gerrit Code Review

View File

@@ -223,6 +223,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();
}