Merge "Emulator gralloc: Support HAL_PIXEL_FORMAT_BLOB"
This commit is contained in:
committed by
Android (Google) Code Review
commit
4cb80a83bc
@@ -189,9 +189,20 @@ static int gralloc_alloc(alloc_device_t* dev,
|
|||||||
// Raw sensor data cannot be used by HW
|
// Raw sensor data cannot be used by HW
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
// Not expecting to actually create any GL surfaces for this
|
||||||
glFormat = GL_LUMINANCE;
|
glFormat = GL_LUMINANCE;
|
||||||
glType = GL_UNSIGNED_SHORT;
|
glType = GL_UNSIGNED_SHORT;
|
||||||
break;
|
break;
|
||||||
|
case HAL_PIXEL_FORMAT_BLOB:
|
||||||
|
bpp = 1;
|
||||||
|
if (! (sw_read && sw_write) ) {
|
||||||
|
// Blob data cannot be used by HW
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
// Not expecting to actually create any GL surfaces for this
|
||||||
|
glFormat = GL_LUMINANCE;
|
||||||
|
glType = GL_UNSIGNED_BYTE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user