diff options
author | 2021-01-15 14:24:34 +0000 | |
---|---|---|
committer | 2021-01-15 14:24:34 +0000 | |
commit | 2416f131f6102f9c60ddbe73f8d43f9f75da1c13 (patch) | |
tree | c68b38bfdc3ec9b6218a93e20293a2620858eaf3 /include/android/bitmap.h | |
parent | d26cd28bce5a34a364d55a4ada25ba798dc868aa (diff) | |
parent | 726a550804ef4fbed2d0a4067d598a322ec6d1f3 (diff) |
Merge "Support building libjnigraphics on the host"
Diffstat (limited to 'include/android/bitmap.h')
-rw-r--r-- | include/android/bitmap.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/android/bitmap.h b/include/android/bitmap.h index f19539913e..d7f25e1858 100644 --- a/include/android/bitmap.h +++ b/include/android/bitmap.h @@ -28,8 +28,23 @@ #include <stdbool.h> #include <stdint.h> +#include <stddef.h> #include <jni.h> +#ifndef __ANDROID__ + // Value copied from 'bionic/libc/include/android/api-level.h' which is not available on + // non Android systems. It is set to 10000 which is same as __ANDROID_API_FUTURE__ value. + #ifndef __ANDROID_API__ + #define __ANDROID_API__ 10000 + #endif + + // Value copied from 'bionic/libc/include/android/versioning.h' which is not available on + // non Android systems + #ifndef __INTRODUCED_IN + #define __INTRODUCED_IN(api_level) + #endif +#endif + #ifdef __cplusplus extern "C" { #endif @@ -152,8 +167,6 @@ int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr); */ int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap); -#if __ANDROID_API__ >= 30 - // Note: these values match android.graphics.Bitmap#compressFormat. /** @@ -203,6 +216,8 @@ typedef bool (*AndroidBitmap_CompressWriteFunc)(void* userContext, const void* data, size_t size) __INTRODUCED_IN(30); +#if __ANDROID_API__ >= 30 + /** * Compress |pixels| as described by |info|. * |