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
diff --git a/include/android/imagedecoder.h b/include/android/imagedecoder.h
index 469b088..31efa65 100644
--- a/include/android/imagedecoder.h
+++ b/include/android/imagedecoder.h
@@ -133,7 +133,7 @@
/**
* 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 @@
* 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 @@
* @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 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);
/**