From 61649d232c96e00d377fcc437e03babef075eef5 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Mon, 20 Aug 2012 10:21:37 -0700 Subject: [PATCH] Emulator gralloc: Fix RAW_SENSOR conditions. Allow RAW_SENSOR to be used for any combination of CPU read/write and Camera read/write, instead of only camera->cpu or cpu->camera. Change-Id: I032b9531e9069a202c1a3767b77975c808703285 --- tools/emulator/opengl/system/gralloc/gralloc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/emulator/opengl/system/gralloc/gralloc.cpp b/tools/emulator/opengl/system/gralloc/gralloc.cpp index 515a879b2..0e437117d 100644 --- a/tools/emulator/opengl/system/gralloc/gralloc.cpp +++ b/tools/emulator/opengl/system/gralloc/gralloc.cpp @@ -217,8 +217,8 @@ static int gralloc_alloc(alloc_device_t* dev, case HAL_PIXEL_FORMAT_RAW_SENSOR: bpp = 2; align = 16*bpp; - if (! ((sw_read && hw_cam_write) || (sw_write && hw_cam_read) ) ) { - // Raw sensor data only goes to/from camera to CPU + if (! ((sw_read || hw_cam_read) && (sw_write || hw_cam_write) ) ) { + // Raw sensor data only goes between camera and CPU return -EINVAL; } // Not expecting to actually create any GL surfaces for this