Merge "AImageDecoder: only support animation for F16 and 8888 (impl)" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bc4e5c6c66
@@ -442,6 +442,15 @@ int AImageDecoder_advanceFrame(AImageDecoder* decoder) {
|
||||
return ANDROID_IMAGE_DECODER_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
const auto colorType = imageDecoder->getOutputInfo().colorType();
|
||||
switch (colorType) {
|
||||
case kN32_SkColorType:
|
||||
case kRGBA_F16_SkColorType:
|
||||
break;
|
||||
default:
|
||||
return ANDROID_IMAGE_DECODER_INVALID_STATE;
|
||||
}
|
||||
|
||||
if (imageDecoder->advanceFrame()) {
|
||||
return ANDROID_IMAGE_DECODER_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user