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

Commit 098f6851 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Track API council feedback" into main

parents 88a7173f 3ff1417e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -586,7 +586,7 @@ int AHardwareBuffer_createFromHandle(const AHardwareBuffer_Desc* desc,
    return NO_ERROR;
}

enum AHardwareBufferStatus AHardwareBuffer_allocate2(
enum AHardwareBufferStatus AHardwareBuffer_allocateWithOptions(
        const AHardwareBuffer_Desc* desc, const AHardwareBufferLongOptions* additionalOptions,
        size_t additionalOptionsSize, AHardwareBuffer** outBuffer) {
    (void)additionalOptions;
+1 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ enum AHardwareBufferStatus : int32_t {
 *         AHARDWAREBUFFER_STATUS_UNKNOWN_ERROR for any other error
 * any reason. The returned buffer has a reference count of 1.
 */
enum AHardwareBufferStatus AHardwareBuffer_allocate2(
enum AHardwareBufferStatus AHardwareBuffer_allocateWithOptions(
        const AHardwareBuffer_Desc* _Nonnull desc,
        const AHardwareBufferLongOptions* _Nullable additionalOptions, size_t additionalOptionsSize,
        AHardwareBuffer* _Nullable* _Nonnull outBuffer) __INTRODUCED_IN(__ANDROID_API_V__);
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ LIBNATIVEWINDOW {
  global:
    AHardwareBuffer_acquire;
    AHardwareBuffer_allocate;
    AHardwareBuffer_allocate2; # llndk systemapi
    AHardwareBuffer_allocateWithOptions; # llndk systemapi
    AHardwareBuffer_createFromHandle; # llndk systemapi
    AHardwareBuffer_describe;
    AHardwareBuffer_getId; # introduced=31
+2 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ TEST(AHardwareBufferTest, Allocate2NoExtras) {
    };

    AHardwareBuffer* buffer = nullptr;
    ASSERT_EQ(0, AHardwareBuffer_allocate2(&desc, nullptr, 0, &buffer));
    ASSERT_EQ(0, AHardwareBuffer_allocateWithOptions(&desc, nullptr, 0, &buffer));
    uint64_t id = 0;
    EXPECT_EQ(0, AHardwareBuffer_getId(buffer, &id));
    EXPECT_NE(0, id);
@@ -219,7 +219,7 @@ TEST(AHardwareBufferTest, Allocate2WithExtras) {
    std::array<AHardwareBufferLongOptions, 1> extras = {{
            {.name = "android.hardware.graphics.common.Dataspace", ADATASPACE_DISPLAY_P3},
    }};
    ASSERT_EQ(0, AHardwareBuffer_allocate2(&desc, extras.data(), extras.size(), &buffer));
    ASSERT_EQ(0, AHardwareBuffer_allocateWithOptions(&desc, extras.data(), extras.size(), &buffer));
    uint64_t id = 0;
    EXPECT_EQ(0, AHardwareBuffer_getId(buffer, &id));
    EXPECT_NE(0, id);