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

Commit de76ab58 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6145313 from b8c73683 to rvc-release

Change-Id: I9108615f8f19c9ac088ebf21a184ccf7295608ed
parents ba07fb2b b8c73683
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,4 +17,4 @@

package android.os;

parcelable PersistableBundle cpp_header "binder/PersistableBundle.h";
@JavaOnlyStableParcelable parcelable PersistableBundle cpp_header "binder/PersistableBundle.h";
+79 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#ifndef ANDROID_BITMAP_H
#define ANDROID_BITMAP_H

#include <stdbool.h>
#include <stdint.h>
#include <jni.h>

@@ -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
+7 −10
Original line number Diff line number Diff line
@@ -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.
+1 −2
Original line number Diff line number Diff line
@@ -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",
    ],
+2 −2
Original line number Diff line number Diff line
@@ -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.
 */
@@ -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