libgralloc: Add RGB_888 format as BUFFER_TYPE_VIDEO

GPU cannothandle RGB 888 format hence mark it is video.
This is required for MPQ.

Change-Id: I52b0e8c20af00a901ce3fc07cfb56d862f00caa9
This commit is contained in:
Prashant Surana 2012-09-10 09:27:33 +05:30 committed by Andrew Sutherland
parent 40a95bd726
commit 0dbb7ae83c

View File

@ -175,7 +175,10 @@ void gpu_context_t::getGrallocInformationFromFormat(int inputFormat,
*bufferType = BUFFER_TYPE_VIDEO;
*colorFormat = inputFormat;
if (inputFormat < 0x7) {
// HAL_PIXEL_FORMAT_RGB_888 is MPQ color format for VCAP videos
// value of RGB_888 is less than 0x7 and this format is not supported
// by the GPU
if ((inputFormat < 0x7) && (inputFormat != HAL_PIXEL_FORMAT_RGB_888)) {
// RGB formats
*colorFormat = inputFormat;
*bufferType = BUFFER_TYPE_UI;