From d0eb44c6da6a8b45f23c5818c999ee74bb0d0339 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Fri, 16 Dec 2016 09:22:53 -0800 Subject: [PATCH] Add support for *_FP16 pixel formats Bug: 32984164 Test: compile Change-Id: I0851c62f140801c6784fdb597b3d947402aa5876 --- modules/gralloc/gralloc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp index e9559e9b..84133fdb 100644 --- a/modules/gralloc/gralloc.cpp +++ b/modules/gralloc/gralloc.cpp @@ -210,6 +210,9 @@ static int gralloc_alloc(alloc_device_t* dev, int bytesPerPixel = 0; switch (format) { + case HAL_PIXEL_FORMAT_RGBA_FP16: + bytesPerPixel = 8; + break; case HAL_PIXEL_FORMAT_RGBA_8888: case HAL_PIXEL_FORMAT_RGBX_8888: case HAL_PIXEL_FORMAT_BGRA_8888: