From 94f641c333bd7e147f8233a636ab979455a5d395 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 6 Mar 2018 09:15:25 -0800 Subject: [PATCH] graphics: move some flex pixel formats to graphcis-sw.h Some of the flex pixel formats are software-only. Move them to graphics-sw.h to identify files that use them. Bug: 70526789 Test: builds Change-Id: I42757af810028f53bb6389c637a00c493041a4fb --- libsystem/include/system/graphics-base.h | 8 -------- libsystem/include/system/graphics-sw.h | 16 ++++++++++++++++ libsystem/include/system/graphics.h | 2 -- 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 libsystem/include/system/graphics-sw.h diff --git a/libsystem/include/system/graphics-base.h b/libsystem/include/system/graphics-base.h index 663b8b020..ea920071c 100644 --- a/libsystem/include/system/graphics-base.h +++ b/libsystem/include/system/graphics-base.h @@ -4,12 +4,4 @@ #include "graphics-base-v1.0.h" #include "graphics-base-v1.1.h" -/* Legacy formats not in the HAL definitions. */ -typedef enum { - HAL_PIXEL_FORMAT_YCBCR_422_888 = 39, // 0x27 - HAL_PIXEL_FORMAT_YCBCR_444_888 = 40, // 0x28 - HAL_PIXEL_FORMAT_FLEX_RGB_888 = 41, // 0x29 - HAL_PIXEL_FORMAT_FLEX_RGBA_8888 = 42, // 0x2A -} android_pixel_format_legacy_t; - #endif // SYSTEM_CORE_GRAPHICS_BASE_H_ diff --git a/libsystem/include/system/graphics-sw.h b/libsystem/include/system/graphics-sw.h new file mode 100644 index 000000000..9e1a88e9e --- /dev/null +++ b/libsystem/include/system/graphics-sw.h @@ -0,0 +1,16 @@ +#ifndef SYSTEM_CORE_GRAPHICS_SW_H_ +#define SYSTEM_CORE_GRAPHICS_SW_H_ + +/* Software formats not in the HAL definitions. */ +typedef enum { + HAL_PIXEL_FORMAT_YCBCR_422_888 = 39, // 0x27 + HAL_PIXEL_FORMAT_YCBCR_444_888 = 40, // 0x28 + HAL_PIXEL_FORMAT_FLEX_RGB_888 = 41, // 0x29 + HAL_PIXEL_FORMAT_FLEX_RGBA_8888 = 42, // 0x2A +} android_pixel_format_sw_t; + +/* for compatibility */ +#define HAL_PIXEL_FORMAT_YCbCr_422_888 HAL_PIXEL_FORMAT_YCBCR_422_888 +#define HAL_PIXEL_FORMAT_YCbCr_444_888 HAL_PIXEL_FORMAT_YCBCR_444_888 + +#endif // SYSTEM_CORE_GRAPHICS_SW_H_ diff --git a/libsystem/include/system/graphics.h b/libsystem/include/system/graphics.h index 657370b9c..6c8f81684 100644 --- a/libsystem/include/system/graphics.h +++ b/libsystem/include/system/graphics.h @@ -32,8 +32,6 @@ extern "C" { /* for compatibility */ #define HAL_PIXEL_FORMAT_YCbCr_420_888 HAL_PIXEL_FORMAT_YCBCR_420_888 -#define HAL_PIXEL_FORMAT_YCbCr_422_888 HAL_PIXEL_FORMAT_YCBCR_422_888 -#define HAL_PIXEL_FORMAT_YCbCr_444_888 HAL_PIXEL_FORMAT_YCBCR_444_888 #define HAL_PIXEL_FORMAT_YCbCr_422_SP HAL_PIXEL_FORMAT_YCBCR_422_SP #define HAL_PIXEL_FORMAT_YCrCb_420_SP HAL_PIXEL_FORMAT_YCRCB_420_SP #define HAL_PIXEL_FORMAT_YCbCr_422_I HAL_PIXEL_FORMAT_YCBCR_422_I