summaryrefslogtreecommitdiff
path: root/tools/emulator/opengl
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-06-12 17:18:19 -0700
committerEino-Ville Talvala <etalvala@google.com>2012-06-13 12:08:18 -0700
commit2a2ada537a911fed07242f62ebdfde70c32cf09c (patch)
tree64bc7a9d4b1c7ba804f33110d13d67b8fdf2026b /tools/emulator/opengl
parent423650c32cf3350b17ecc3bbc50b4d98c1a81e5f (diff)
Emulator gralloc: Support HAL_PIXEL_FORMAT_BLOB
Bug: 6243944 Change-Id: I2864bc59be9df8741639a291c71e2f65dde5bc0b
Diffstat (limited to 'tools/emulator/opengl')
-rw-r--r--tools/emulator/opengl/system/gralloc/gralloc.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/emulator/opengl/system/gralloc/gralloc.cpp b/tools/emulator/opengl/system/gralloc/gralloc.cpp
index 433483587..90781f1ae 100644
--- a/tools/emulator/opengl/system/gralloc/gralloc.cpp
+++ b/tools/emulator/opengl/system/gralloc/gralloc.cpp
@@ -189,9 +189,20 @@ static int gralloc_alloc(alloc_device_t* dev,
// Raw sensor data cannot be used by HW
return -EINVAL;
}
+ // Not expecting to actually create any GL surfaces for this
glFormat = GL_LUMINANCE;
glType = GL_UNSIGNED_SHORT;
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:
return -EINVAL;
}