Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df33b95e authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

AImageDecoder: only support animation for F16 and 8888 (impl)

Bug: 180594747
Test: I51dedd94aa8ff5d6846cada96861ffca30d509d7

See I03818703dc79942be4e574db31c6e2927ab571ed

Change-Id: Ibce55e4af38713d2e40fcb8846d9d7a939367fd6
parent 43cc358f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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;
    }