Expose 1010102 config for bitmap
Bug: 200307898 Test: CtsGraphicsTestCases Change-Id: I33153e080292a95c0cc3d6edada8b274f0b06ac7
This commit is contained in:
@@ -198,14 +198,16 @@ static SkColorType getColorType(AndroidBitmapFormat format) {
|
||||
return kGray_8_SkColorType;
|
||||
case ANDROID_BITMAP_FORMAT_RGBA_F16:
|
||||
return kRGBA_F16_SkColorType;
|
||||
case ANDROID_BITMAP_FORMAT_RGBA_1010102:
|
||||
return kRGBA_1010102_SkColorType;
|
||||
default:
|
||||
return kUnknown_SkColorType;
|
||||
}
|
||||
}
|
||||
|
||||
int AImageDecoder_setAndroidBitmapFormat(AImageDecoder* decoder, int32_t format) {
|
||||
if (!decoder || format < ANDROID_BITMAP_FORMAT_NONE
|
||||
|| format > ANDROID_BITMAP_FORMAT_RGBA_F16) {
|
||||
if (!decoder || format < ANDROID_BITMAP_FORMAT_NONE ||
|
||||
format > ANDROID_BITMAP_FORMAT_RGBA_1010102) {
|
||||
return ANDROID_IMAGE_DECODER_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -290,6 +292,8 @@ static AndroidBitmapFormat getFormat(SkColorType colorType) {
|
||||
return ANDROID_BITMAP_FORMAT_A_8;
|
||||
case kRGBA_F16_SkColorType:
|
||||
return ANDROID_BITMAP_FORMAT_RGBA_F16;
|
||||
case kRGBA_1010102_SkColorType:
|
||||
return ANDROID_BITMAP_FORMAT_RGBA_1010102;
|
||||
default:
|
||||
return ANDROID_BITMAP_FORMAT_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user