Loading aidl/binder/android/os/PersistableBundle.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -17,4 +17,4 @@ package android.os; parcelable PersistableBundle cpp_header "binder/PersistableBundle.h"; @JavaOnlyStableParcelable parcelable PersistableBundle cpp_header "binder/PersistableBundle.h"; include/android/bitmap.h +79 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #ifndef ANDROID_BITMAP_H #define ANDROID_BITMAP_H #include <stdbool.h> #include <stdint.h> #include <jni.h> Loading Loading @@ -133,6 +134,84 @@ 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. /** * Specifies the formats that can be compressed to with * {@link AndroidBitmap_compress}. */ enum AndroidBitmapCompressFormat { /** * Compress to the JPEG format. quality of 0 means * compress for the smallest size. 100 means compress for max * visual quality. */ ANDROID_BITMAP_COMPRESS_FORMAT_JPEG = 0, /** * Compress to the PNG format. PNG is lossless, so quality is * ignored. */ ANDROID_BITMAP_COMPRESS_FORMAT_PNG = 1, /** * Compress to the WEBP lossy format. quality of 0 means * compress for the smallest size. 100 means compress for max * visual quality. */ ANDROID_BITMAP_COMPRESS_FORMAT_WEBP_LOSSY = 3, /** * Compress to the WEBP lossless format. quality refers to how * much effort to put into compression. A value of 0 means to * compress quickly, resulting in a relatively large file size. * 100 means to spend more time compressing, resulting in a * smaller file. */ ANDROID_BITMAP_COMPRESS_FORMAT_WEBP_LOSSLESS = 4, }; /** * User-defined function for writing the output of compression. * * @param userContext Pointer to user-defined data passed to * {@link AndroidBitmap_compress}. * @param data Compressed data of |size| bytes to write. * @param size Length in bytes of data to write. * @return Whether the operation succeeded. */ typedef bool (*AndroidBitmap_compress_write_fn)(void* userContext, const void* data, size_t size) __INTRODUCED_IN(30); /** * Compress |pixels| as described by |info|. * * @param info Description of the pixels to compress. * @param dataspace {@link ADataSpace} describing the color space of the * pixels. * @param pixels Pointer to pixels to compress. * @param format (@link AndroidBitmapCompressFormat} to compress to. * @param quality Hint to the compressor, 0-100. The value is interpreted * differently depending on the * {@link AndroidBitmapCompressFormat}. * @param userContext User-defined data which will be passed to the supplied * {@link AndroidBitmap_compress_write_fn} each time it is * called. May be null. * @parm fn Function that writes the compressed data. Will be called each time * the compressor has compressed more data that is ready to be * written. May be called more than once for each call to this method. * May not be null. * @return AndroidBitmap functions result code. */ int AndroidBitmap_compress(const AndroidBitmapInfo* info, int32_t dataspace, const void* pixels, int32_t format, int32_t quality, void* userContext, AndroidBitmap_compress_write_fn fn) __INTRODUCED_IN(30); #endif // __ANDROID_API__ >= 30 #ifdef __cplusplus } #endif Loading include/android/imagedecoder.h +7 −10 Original line number Diff line number Diff line Loading @@ -143,23 +143,20 @@ void AImageDecoder_delete(AImageDecoder* decoder) __INTRODUCED_IN(30); int AImageDecoder_setAndroidBitmapFormat(AImageDecoder*, int32_t format) __INTRODUCED_IN(30); /* * Choose the desired output format. * * Must be one of: * {@link ANDROID_BITMAP_FLAGS_ALPHA_PREMUL} * {@link ANDROID_BITMAP_FLAGS_ALPHA_OPAQUE} * {@link ANDROID_BITMAP_FLAGS_ALPHA_UNPREMUL} /** * Specify whether the output's pixels should be unpremultiplied. * * Note: An OPAQUE image may be set to any of them. * A non-OPAQUE image may not be set to OPAQUE * By default, the decoder will premultiply the pixels, if they have alpha. Pass * false to this method to leave them unpremultiplied. This has no effect on an * opaque image. * * @param required Pass true to leave the pixels unpremultiplied. * @return - {@link ANDROID_IMAGE_DECODER_SUCCESS} on success * - {@link ANDROID_IMAGE_DECODER_INVALID_CONVERSION} if the conversion * is not possible * - {@link ANDROID_IMAGE_DECODER_BAD_PARAMETER} for bad parameters */ int AImageDecoder_setAlphaFlags(AImageDecoder*, int alphaFlags) __INTRODUCED_IN(30); int AImageDecoder_setUnpremultipliedRequired(AImageDecoder*, bool required) __INTRODUCED_IN(30); /** * Specify the output size for a decoded image. Loading libs/binder/ndk/test/Android.bp +1 −2 Original line number Diff line number Diff line Loading @@ -90,8 +90,7 @@ cc_test { aidl_interface { name: "IBinderVendorDoubleLoadTest", // TODO(b/119771576): only vendor is needed vendor_available: true, vendor: true, srcs: [ "IBinderVendorDoubleLoadTest.aidl", ], Loading libs/gralloc/types/include/gralloctypes/Gralloc4.h +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ #include <aidl/android/hardware/graphics/common/XyColor.h> #include <android/hardware/graphics/mapper/4.0/IMapper.h> namespace android { /** * Define equality operators for Stable AIDL types. */ Loading Loading @@ -210,8 +212,6 @@ inline bool operator!=(const aidl::android::hardware::graphics::common::Cta861_3 return !(lhs == rhs); } namespace android { namespace gralloc4 { #define GRALLOC4_STANDARD_METADATA_TYPE "android.hardware.graphics.common.StandardMetadataType" Loading Loading
aidl/binder/android/os/PersistableBundle.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -17,4 +17,4 @@ package android.os; parcelable PersistableBundle cpp_header "binder/PersistableBundle.h"; @JavaOnlyStableParcelable parcelable PersistableBundle cpp_header "binder/PersistableBundle.h";
include/android/bitmap.h +79 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #ifndef ANDROID_BITMAP_H #define ANDROID_BITMAP_H #include <stdbool.h> #include <stdint.h> #include <jni.h> Loading Loading @@ -133,6 +134,84 @@ 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. /** * Specifies the formats that can be compressed to with * {@link AndroidBitmap_compress}. */ enum AndroidBitmapCompressFormat { /** * Compress to the JPEG format. quality of 0 means * compress for the smallest size. 100 means compress for max * visual quality. */ ANDROID_BITMAP_COMPRESS_FORMAT_JPEG = 0, /** * Compress to the PNG format. PNG is lossless, so quality is * ignored. */ ANDROID_BITMAP_COMPRESS_FORMAT_PNG = 1, /** * Compress to the WEBP lossy format. quality of 0 means * compress for the smallest size. 100 means compress for max * visual quality. */ ANDROID_BITMAP_COMPRESS_FORMAT_WEBP_LOSSY = 3, /** * Compress to the WEBP lossless format. quality refers to how * much effort to put into compression. A value of 0 means to * compress quickly, resulting in a relatively large file size. * 100 means to spend more time compressing, resulting in a * smaller file. */ ANDROID_BITMAP_COMPRESS_FORMAT_WEBP_LOSSLESS = 4, }; /** * User-defined function for writing the output of compression. * * @param userContext Pointer to user-defined data passed to * {@link AndroidBitmap_compress}. * @param data Compressed data of |size| bytes to write. * @param size Length in bytes of data to write. * @return Whether the operation succeeded. */ typedef bool (*AndroidBitmap_compress_write_fn)(void* userContext, const void* data, size_t size) __INTRODUCED_IN(30); /** * Compress |pixels| as described by |info|. * * @param info Description of the pixels to compress. * @param dataspace {@link ADataSpace} describing the color space of the * pixels. * @param pixels Pointer to pixels to compress. * @param format (@link AndroidBitmapCompressFormat} to compress to. * @param quality Hint to the compressor, 0-100. The value is interpreted * differently depending on the * {@link AndroidBitmapCompressFormat}. * @param userContext User-defined data which will be passed to the supplied * {@link AndroidBitmap_compress_write_fn} each time it is * called. May be null. * @parm fn Function that writes the compressed data. Will be called each time * the compressor has compressed more data that is ready to be * written. May be called more than once for each call to this method. * May not be null. * @return AndroidBitmap functions result code. */ int AndroidBitmap_compress(const AndroidBitmapInfo* info, int32_t dataspace, const void* pixels, int32_t format, int32_t quality, void* userContext, AndroidBitmap_compress_write_fn fn) __INTRODUCED_IN(30); #endif // __ANDROID_API__ >= 30 #ifdef __cplusplus } #endif Loading
include/android/imagedecoder.h +7 −10 Original line number Diff line number Diff line Loading @@ -143,23 +143,20 @@ void AImageDecoder_delete(AImageDecoder* decoder) __INTRODUCED_IN(30); int AImageDecoder_setAndroidBitmapFormat(AImageDecoder*, int32_t format) __INTRODUCED_IN(30); /* * Choose the desired output format. * * Must be one of: * {@link ANDROID_BITMAP_FLAGS_ALPHA_PREMUL} * {@link ANDROID_BITMAP_FLAGS_ALPHA_OPAQUE} * {@link ANDROID_BITMAP_FLAGS_ALPHA_UNPREMUL} /** * Specify whether the output's pixels should be unpremultiplied. * * Note: An OPAQUE image may be set to any of them. * A non-OPAQUE image may not be set to OPAQUE * By default, the decoder will premultiply the pixels, if they have alpha. Pass * false to this method to leave them unpremultiplied. This has no effect on an * opaque image. * * @param required Pass true to leave the pixels unpremultiplied. * @return - {@link ANDROID_IMAGE_DECODER_SUCCESS} on success * - {@link ANDROID_IMAGE_DECODER_INVALID_CONVERSION} if the conversion * is not possible * - {@link ANDROID_IMAGE_DECODER_BAD_PARAMETER} for bad parameters */ int AImageDecoder_setAlphaFlags(AImageDecoder*, int alphaFlags) __INTRODUCED_IN(30); int AImageDecoder_setUnpremultipliedRequired(AImageDecoder*, bool required) __INTRODUCED_IN(30); /** * Specify the output size for a decoded image. Loading
libs/binder/ndk/test/Android.bp +1 −2 Original line number Diff line number Diff line Loading @@ -90,8 +90,7 @@ cc_test { aidl_interface { name: "IBinderVendorDoubleLoadTest", // TODO(b/119771576): only vendor is needed vendor_available: true, vendor: true, srcs: [ "IBinderVendorDoubleLoadTest.aidl", ], Loading
libs/gralloc/types/include/gralloctypes/Gralloc4.h +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ #include <aidl/android/hardware/graphics/common/XyColor.h> #include <android/hardware/graphics/mapper/4.0/IMapper.h> namespace android { /** * Define equality operators for Stable AIDL types. */ Loading Loading @@ -210,8 +212,6 @@ inline bool operator!=(const aidl::android::hardware::graphics::common::Cta861_3 return !(lhs == rhs); } namespace android { namespace gralloc4 { #define GRALLOC4_STANDARD_METADATA_TYPE "android.hardware.graphics.common.StandardMetadataType" Loading