summaryrefslogtreecommitdiffstats
path: root/libgralloc/mapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libgralloc/mapper.cpp')
-rw-r--r--libgralloc/mapper.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/libgralloc/mapper.cpp b/libgralloc/mapper.cpp
index 142586b83..549951bc3 100644
--- a/libgralloc/mapper.cpp
+++ b/libgralloc/mapper.cpp
@@ -309,6 +309,7 @@ int gralloc_perform(struct gralloc_module_t const* module,
int width = va_arg(args, int);
int height = va_arg(args, int);
int format = va_arg(args, int);
+ int alignedw = 0, alignedh = 0;
native_handle_t** handle = va_arg(args, native_handle_t**);
private_handle_t* hnd = (private_handle_t*)native_handle_create(
@@ -321,8 +322,12 @@ int gralloc_perform(struct gralloc_module_t const* module,
hnd->offset = offset;
hnd->base = uint64_t(base) + offset;
hnd->gpuaddr = 0;
- hnd->width = width;
- hnd->height = height;
+ AdrenoMemInfo::getInstance().getAlignedWidthAndHeight(width,
+ height, format, 0, alignedw, alignedh);
+ hnd->width = alignedw;
+ hnd->height = alignedh;
+ hnd->real_width = width;
+ hnd->real_height = height;
hnd->format = format;
*handle = (native_handle_t *)hnd;
res = 0;