gralloc: Modify check for uncompressed RGB buffers
The previous check for RGB formats skipped certain formats and hence the alignment was incorrect. Add a check for all non-compressed RGB formats before calling getGpuAlignedWidthHeight CRs-fixed: 888733 Change-Id: Icae4cfb92ceae5e593fd6c5658999fc90ef97ea1
This commit is contained in:
committed by
Kaushik Kanetkar
parent
57265ee8cc
commit
cffc5bd986
@@ -188,12 +188,9 @@ void gpu_context_t::getGrallocInformationFromFormat(int inputFormat,
|
||||
{
|
||||
*bufferType = BUFFER_TYPE_VIDEO;
|
||||
|
||||
if (inputFormat <= HAL_PIXEL_FORMAT_BGRA_8888) {
|
||||
if (isUncompressedRgbFormat(inputFormat) == TRUE) {
|
||||
// RGB formats
|
||||
*bufferType = BUFFER_TYPE_UI;
|
||||
} else if ((inputFormat == HAL_PIXEL_FORMAT_R_8) ||
|
||||
(inputFormat == HAL_PIXEL_FORMAT_RG_88)) {
|
||||
*bufferType = BUFFER_TYPE_UI;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user