gralloc: Add automatic format selection
Have gralloc_alloc be able to select the appropriate pixel format given the endpoints, triggered by new GRALLOC_EMULATOR_PIXEL_FORMAT_AUTO format. Currently supports camera->screen, and camera->video encoder. Bug: 6243944 Change-Id: Ib1bf8da8d9184ac99e7f50aad09212c146c32809
This commit is contained in:
@@ -1146,7 +1146,9 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EG
|
||||
if (native_buffer->common.version != sizeof(android_native_buffer_t))
|
||||
setErrorReturn(EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
|
||||
|
||||
switch (native_buffer->format) {
|
||||
cb_handle_t *cb = (cb_handle_t *)(native_buffer->handle);
|
||||
|
||||
switch (cb->format) {
|
||||
case HAL_PIXEL_FORMAT_RGBA_8888:
|
||||
case HAL_PIXEL_FORMAT_RGBX_8888:
|
||||
case HAL_PIXEL_FORMAT_RGB_888:
|
||||
|
||||
Reference in New Issue
Block a user