From 5d0445cc3e16af2e49ae87580ecc420be54b4608 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Thu, 23 Jan 2020 09:43:43 -0500 Subject: Clean up imagedecoder header file Bug: 135133301 Test: Ibf7c0e563feeb08ce6dbabb5e86ddb385c9dff54 Remove AImageDecoderHeaderInfo_isAnimated. We are punting animation support to S, so there is no reason to report whether the image is animated. Use int32_t for width and height. We already return these for AImageDecoderHeaderInfo_getWidth/getHeight, so use the same type for AImageDecoder_setTargetSize/computeSampledSize. Use int32_t for AImageDecoderHeaderInfo_getAndroidBitmapFormat. This matches the convention for what to return when the value is logically an enum. Change-Id: I93df851dd9fee2eb8d097e2158fb95003a0474db --- include/android/imagedecoder.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'include/android/imagedecoder.h') diff --git a/include/android/imagedecoder.h b/include/android/imagedecoder.h index 469b088c89..31efa65cbe 100644 --- a/include/android/imagedecoder.h +++ b/include/android/imagedecoder.h @@ -133,7 +133,7 @@ void AImageDecoder_delete(AImageDecoder* decoder) __INTRODUCED_IN(30); /** * Choose the desired output format. * - * @param format AndroidBitmapFormat to use + * @param format {@link AndroidBitmapFormat} to use for the output. * @return {@link ANDROID_IMAGE_DECODER_SUCCESS} if the format is compatible * with the image and {@link ANDROID_IMAGE_DECODER_INVALID_CONVERSION} * otherwise. In the latter case, the AImageDecoder uses the @@ -196,7 +196,7 @@ int AImageDecoder_setDataSpace(AImageDecoder*, int32_t dataspace) __INTRODUCED_I * pointer is null, width or height is <= 0, or any existing crop is * not contained by the image dimensions. */ -int AImageDecoder_setTargetSize(AImageDecoder*, int width, int height) __INTRODUCED_IN(30); +int AImageDecoder_setTargetSize(AImageDecoder*, int32_t width, int32_t height) __INTRODUCED_IN(30); /** @@ -219,7 +219,7 @@ int AImageDecoder_setTargetSize(AImageDecoder*, int width, int height) __INTRODU * @return ANDROID_IMAGE_DECODER result code. */ int AImageDecoder_computeSampledSize(const AImageDecoder*, int sampleSize, - int* width, int* height) __INTRODUCED_IN(30); + int32_t* width, int32_t* height) __INTRODUCED_IN(30); /** * Specify how to crop the output after scaling (if any). * @@ -276,18 +276,12 @@ const char* AImageDecoderHeaderInfo_getMimeType( const AImageDecoderHeaderInfo*) __INTRODUCED_IN(30); /** - * Report whether the encoded image represents an animation. - */ -bool AImageDecoderHeaderInfo_isAnimated( - const AImageDecoderHeaderInfo*) __INTRODUCED_IN(30); - -/** - * Report the AndroidBitmapFormat the AImageDecoder will decode to + * Report the {@link AndroidBitmapFormat} the AImageDecoder will decode to * by default. AImageDecoder will try to choose one that is sensible * for the image and the system. Note that this does not indicate the * encoded format of the image. */ -AndroidBitmapFormat AImageDecoderHeaderInfo_getAndroidBitmapFormat( +int32_t AImageDecoderHeaderInfo_getAndroidBitmapFormat( const AImageDecoderHeaderInfo*) __INTRODUCED_IN(30); /** -- cgit v1.2.3-59-g8ed1b