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

Commit bc4e5c6c authored by Leon Scroggins's avatar Leon Scroggins Committed by Android (Google) Code Review
Browse files

Merge "AImageDecoder: only support animation for F16 and 8888 (impl)" into sc-dev

parents 33866688 df33b95e
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -442,6 +442,15 @@ int AImageDecoder_advanceFrame(AImageDecoder* decoder) {
        return ANDROID_IMAGE_DECODER_BAD_PARAMETER;
        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()) {
    if (imageDecoder->advanceFrame()) {
        return ANDROID_IMAGE_DECODER_SUCCESS;
        return ANDROID_IMAGE_DECODER_SUCCESS;
    }
    }