增加PixelFormat宏定义

Signed-off-by: WangJiazhen <wangjiazhen4@huawei.com>
This commit is contained in:
WangJiazhen 2024-09-21 22:00:02 +08:00
parent f3941c19f6
commit 2ad599b710
3 changed files with 5 additions and 0 deletions

View File

@ -29,6 +29,8 @@ PixelFormat PixelMapOhos::PixelFormatConverter(Media::PixelFormat pixelFormat)
return PixelFormat::RGB_565;
case Media::PixelFormat::RGBA_8888:
return PixelFormat::RGBA_8888;
case Media::PixelFormat::RGBA_1010102:
return PixelFormat::RGBA_1010102;
case Media::PixelFormat::BGRA_8888:
return PixelFormat::BGRA_8888;
case Media::PixelFormat::ALPHA_8:

View File

@ -47,6 +47,7 @@ enum class PixelFormat : int32_t {
NV21 = 8, // Each pixel is stored on 3/2 bytes.
NV12 = 9,
CMYK = 10,
RGBA_1010102 = 14,
};
enum class AlphaType : int32_t {

View File

@ -906,6 +906,8 @@ RSColorType ImageProvider::PixelFormatToDrawingColorType(const RefPtr<PixelMap>&
return RSColorType::COLORTYPE_RGB_565;
case PixelFormat::RGBA_8888:
return RSColorType::COLORTYPE_RGBA_8888;
case PixelFormat::RGBA_1010102:
return RSColorType::COLORTYPE_RGBA_1010102;
case PixelFormat::BGRA_8888:
return RSColorType::COLORTYPE_BGRA_8888;
case PixelFormat::ALPHA_8: