libgralloc: Use new GFX API to calculate stride

Use new GFX API compute_aligned_width_and_height to get the stride
value for RGB surfaces.
Backward compatible with GFX old API when old GFX library is used.

Change-Id: I15b0954602b816bf4e88f48622494144fc77c14f
This commit is contained in:
Ramkumar Radhakrishnan
2013-11-04 14:29:18 -08:00
committed by Manoj Kumar AVM
parent 15eeacdcd6
commit 473f4085e3
3 changed files with 61 additions and 24 deletions

View File

@@ -329,7 +329,10 @@ int gralloc_perform(struct gralloc_module_t const* module,
int width = va_arg(args, int);
int format = va_arg(args, int);
int *stride = va_arg(args, int *);
*stride = AdrenoMemInfo::getInstance().getStride(width, format);
int alignedw = 0, alignedh = 0;
AdrenoMemInfo::getInstance().getAlignedWidthAndHeight(width,
0, format, alignedw, alignedh);
*stride = alignedw;
res = 0;
} break;
case GRALLOC_MODULE_PERFORM_GET_CUSTOM_STRIDE_FROM_HANDLE: