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

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

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
parent 4274794a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
#define ANDROID_IMAGE_DECODER_H

#include "bitmap.h"

#include <android/rect.h>
#include <stdint.h>

#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.