diff options
| -rw-r--r-- | libs/nativewindow/AHardwareBuffer.cpp | 2 | ||||
| -rw-r--r-- | libs/nativewindow/include/vndk/hardware_buffer.h | 2 | ||||
| -rw-r--r-- | libs/nativewindow/libnativewindow.map.txt | 2 | ||||
| -rw-r--r-- | libs/nativewindow/tests/AHardwareBufferTest.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/libs/nativewindow/AHardwareBuffer.cpp b/libs/nativewindow/AHardwareBuffer.cpp index 745b6f30cc..52612870ab 100644 --- a/libs/nativewindow/AHardwareBuffer.cpp +++ b/libs/nativewindow/AHardwareBuffer.cpp @@ -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; diff --git a/libs/nativewindow/include/vndk/hardware_buffer.h b/libs/nativewindow/include/vndk/hardware_buffer.h index 491860125f..bcfae10201 100644 --- a/libs/nativewindow/include/vndk/hardware_buffer.h +++ b/libs/nativewindow/include/vndk/hardware_buffer.h @@ -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__); diff --git a/libs/nativewindow/libnativewindow.map.txt b/libs/nativewindow/libnativewindow.map.txt index 8bc1292986..e29d5a6bb4 100644 --- a/libs/nativewindow/libnativewindow.map.txt +++ b/libs/nativewindow/libnativewindow.map.txt @@ -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 diff --git a/libs/nativewindow/tests/AHardwareBufferTest.cpp b/libs/nativewindow/tests/AHardwareBufferTest.cpp index 1f0128a48e..136395aac0 100644 --- a/libs/nativewindow/tests/AHardwareBufferTest.cpp +++ b/libs/nativewindow/tests/AHardwareBufferTest.cpp @@ -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); |