diff options
author | Tim Murray <timmurray@google.com> | 2013-12-17 17:15:25 -0800 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2014-01-31 12:35:17 -0800 |
commit | e6eaaf6a8e491404c33aab5cd70444d2637df1bc (patch) | |
tree | 43a239852245f7f4ad1f306b5724d4ae7b4d2eff /rs/java | |
parent | 355707e4f665904e31d9f5fcff1e3921f7db8cdd (diff) | |
download | frameworks_base-e6eaaf6a8e491404c33aab5cd70444d2637df1bc.zip frameworks_base-e6eaaf6a8e491404c33aab5cd70444d2637df1bc.tar.gz frameworks_base-e6eaaf6a8e491404c33aab5cd70444d2637df1bc.tar.bz2 |
Fix getBytesSize for YUV allocations.
bug 12134914
Change-Id: I128e75b756a5bd129077177e254f1db6c94182f1
Diffstat (limited to 'rs/java')
-rw-r--r-- | rs/java/android/renderscript/Allocation.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java index 98fabce..67d94f9 100644 --- a/rs/java/android/renderscript/Allocation.java +++ b/rs/java/android/renderscript/Allocation.java @@ -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(); } |