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:
committed by
Manoj Kumar AVM
parent
15eeacdcd6
commit
473f4085e3
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user