merge in jb-mr1-release history after reset to jb-mr1-dev
diff --git a/gralloc/gralloc.cpp b/gralloc/gralloc.cpp
index d10dc27..f3610f3 100644
--- a/gralloc/gralloc.cpp
+++ b/gralloc/gralloc.cpp
@@ -193,16 +193,17 @@
switch (format) {
case HAL_PIXEL_FORMAT_YV12:
*stride = ALIGN(w, 16);
+ size = (*stride * h) + (ALIGN(*stride / 2, 16) * h);
break;
case HAL_PIXEL_FORMAT_YCrCb_420_SP:
*stride = w;
+ size = *stride * h * 3 / 2;
break;
default:
ALOGE("invalid yuv format %d\n", format);
return -EINVAL;
}
- size = *stride * h * 3 / 2;
err = ion_alloc_fd(ionfd, size, 0, 1 << ION_HEAP_TYPE_SYSTEM,
ion_flags, &fd);
if (err)