EmulatedFakeCamera2: Use HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED

Stop using CAMERA2_HAL_PIXEL_FORMAT_OPAQUE.

Bug: 6243944
Change-Id: I96ea30228b126b4eed560a760269cb50bbbb62f7
This commit is contained in:
Eino-Ville Talvala
2012-08-28 14:39:59 -07:00
parent eb502a31bc
commit 33c3f77760
3 changed files with 10 additions and 23 deletions

View File

@@ -156,7 +156,7 @@ static int gralloc_alloc(alloc_device_t* dev,
// Pick the right concrete pixel format given the endpoints as encoded in
// the usage bits. Every end-point pair needs explicit listing here.
if (format == GRALLOC_EMULATOR_PIXEL_FORMAT_AUTO) {
if (format == HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) {
// Camera as producer
if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) {
if (usage & GRALLOC_USAGE_HW_TEXTURE) {
@@ -165,10 +165,13 @@ static int gralloc_alloc(alloc_device_t* dev,
} else if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) {
// Camera-to-encoder is NV21
format = HAL_PIXEL_FORMAT_YCrCb_420_SP;
} else if (usage & GRALLOC_USAGE_HW_CAMERA_ZSL) {
// Camera-to-ZSL-queue is RGB_888
format = HAL_PIXEL_FORMAT_RGB_888;
}
}
if (format == GRALLOC_EMULATOR_PIXEL_FORMAT_AUTO) {
if (format == HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) {
ALOGE("gralloc_alloc: Requested auto format selection, "
"but no known format for this usage: %d x %d, usage %x",
w, h, usage);