From a9f397b562df067d27888789954c539f6c0fa624 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Mon, 27 Jan 2020 12:42:56 -0500 Subject: Update imagedecoder.h to build as a C file Bug: 135133301 Test: build as a C file AAsset is a forward-declared struct, so it needs to be declared in parameters as a struct in order to compile as a C file. In addition, include rect.h explicitly for documentation purposes. This also means that ARect as a parameter does not need to be declared as "struct ARect". Change-Id: I30c5176010ec3b5b0405f0b383654a7cfca65b62 --- include/android/imagedecoder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/android/imagedecoder.h') diff --git a/include/android/imagedecoder.h b/include/android/imagedecoder.h index 469b088c89..cabd626c35 100644 --- a/include/android/imagedecoder.h +++ b/include/android/imagedecoder.h @@ -27,7 +27,7 @@ #define ANDROID_IMAGE_DECODER_H #include "bitmap.h" - +#include #include #ifdef __cplusplus @@ -35,7 +35,6 @@ extern "C" { #endif struct AAsset; -struct ARect; #if __ANDROID_API__ >= 30 @@ -92,7 +91,8 @@ typedef struct AImageDecoder AImageDecoder; * @return {@link ANDROID_IMAGE_DECODER_SUCCESS} on success or a value * indicating reason for the failure. */ -int AImageDecoder_createFromAAsset(AAsset* asset, AImageDecoder** outDecoder) __INTRODUCED_IN(30); +int AImageDecoder_createFromAAsset(struct AAsset* asset, AImageDecoder** outDecoder) + __INTRODUCED_IN(30); /** * Create a new AImageDecoder from a file descriptor. -- cgit v1.2.3-59-g8ed1b