Skip to content
Snippets Groups Projects
Commit c62b9a26 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5567188 from 146f745d to qt-release

Change-Id: I016b434a1b1d1cb11dec031095b309cf59942902
parents 99399b2c 146f745d
No related branches found
No related tags found
No related merge requests found
......@@ -479,6 +479,7 @@ static int gralloc_alloc(alloc_device_t* dev,
bool sw_write = (0 != (usage & GRALLOC_USAGE_SW_WRITE_MASK));
bool hw_write = (usage & GRALLOC_USAGE_HW_RENDER);
bool sw_read = (0 != (usage & GRALLOC_USAGE_SW_READ_MASK));
const bool hw_texture = usage & GRALLOC_USAGE_HW_TEXTURE;
#if PLATFORM_SDK_VERSION >= 17
bool hw_cam_write = (usage & GRALLOC_USAGE_HW_CAMERA_WRITE);
bool hw_cam_read = (usage & GRALLOC_USAGE_HW_CAMERA_READ);
......@@ -541,6 +542,15 @@ static int gralloc_alloc(alloc_device_t* dev,
glFormat = GL_RGBA;
glType = GL_UNSIGNED_BYTE;
break;
case HAL_PIXEL_FORMAT_RGB_888:
if (hw_texture) {
return -EINVAL; // we dont support RGB_888 for HW textures
} else {
bpp = 3;
glFormat = GL_RGB;
glType = GL_UNSIGNED_BYTE;
break;
}
case HAL_PIXEL_FORMAT_RGB_565:
bpp = 2;
// Workaround: distinguish vs the RGB8/RGBA8
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment