From 0dbb7ae83c08070857634afe8890fc420bcbce17 Mon Sep 17 00:00:00 2001 From: Prashant Surana Date: Mon, 10 Sep 2012 09:27:33 +0530 Subject: [PATCH] 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 --- libgralloc/gpu.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgralloc/gpu.cpp b/libgralloc/gpu.cpp index 7f9182f..898dbbc 100644 --- a/libgralloc/gpu.cpp +++ b/libgralloc/gpu.cpp @@ -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;