A wrapper for AHardwareBuffer https://developer.android.com/ndk/reference/group/a-hardware-buffer. More...
#include <hardware_buffer.h>
Public Member Functions | |
HardwareBuffer (HardwareBufferDescriptor descriptor) | |
~HardwareBuffer () | |
HardwareBuffer (const HardwareBuffer &)=delete | |
HardwareBuffer & | operator= (const HardwareBuffer &)=delete |
bool | IsValid () const |
AHardwareBuffer * | GetHandle () const |
const HardwareBufferDescriptor & | GetDescriptor () const |
const AHardwareBuffer_Desc & | GetAndroidDescriptor () const |
std::optional< uint64_t > | GetSystemUniqueID () const |
Get the system wide unique ID of the hardware buffer if possible. This is only available on Android API 31 and above. Within the process, the handle are unique. More... | |
Static Public Member Functions | |
static bool | IsAvailableOnPlatform () |
static std::optional< AHardwareBuffer_Desc > | Describe (AHardwareBuffer *buffer) |
static std::optional< uint64_t > | GetSystemUniqueID (AHardwareBuffer *buffer) |
Get the system wide unique ID of the hardware buffer if possible. This is only available on Android API 31 and above. Within the process, the handle are unique. More... | |
A wrapper for AHardwareBuffer https://developer.android.com/ndk/reference/group/a-hardware-buffer.
This wrapper creates and owns a handle to a managed hardware buffer. That is, there is no ability to take a reference to an externally created hardware buffer.
This wrapper is only available on Android API 29 and above.
Definition at line 88 of file hardware_buffer.h.
|
explicit |
Definition at line 47 of file hardware_buffer.cc.
References impeller::android::GetProcTable(), impeller::android::HardwareBufferDescriptor::IsAllocatable(), and VALIDATION_LOG.
|
default |
|
delete |
|
static |
Definition at line 120 of file hardware_buffer.cc.
References impeller::android::GetProcTable().
Referenced by impeller::android::testing::TEST().
const AHardwareBuffer_Desc & impeller::android::HardwareBuffer::GetAndroidDescriptor | ( | ) | const |
Definition at line 96 of file hardware_buffer.cc.
const HardwareBufferDescriptor & impeller::android::HardwareBuffer::GetDescriptor | ( | ) | const |
Definition at line 92 of file hardware_buffer.cc.
AHardwareBuffer * impeller::android::HardwareBuffer::GetHandle | ( | ) | const |
Definition at line 73 of file hardware_buffer.cc.
Referenced by GetSystemUniqueID(), impeller::android::SurfaceTransaction::SetContents(), and impeller::android::testing::TEST().
std::optional< uint64_t > impeller::android::HardwareBuffer::GetSystemUniqueID | ( | ) | const |
Get the system wide unique ID of the hardware buffer if possible. This is only available on Android API 31 and above. Within the process, the handle are unique.
Definition at line 104 of file hardware_buffer.cc.
References GetHandle().
Referenced by impeller::android::testing::TEST().
|
static |
Get the system wide unique ID of the hardware buffer if possible. This is only available on Android API 31 and above. Within the process, the handle are unique.
Definition at line 108 of file hardware_buffer.cc.
References impeller::android::GetProcTable().
|
static |
Definition at line 100 of file hardware_buffer.cc.
References impeller::android::GetProcTable(), and impeller::android::ProcTable::IsValid().
Referenced by impeller::android::testing::TEST().
bool impeller::android::HardwareBuffer::IsValid | ( | ) | const |
Definition at line 69 of file hardware_buffer.cc.
Referenced by impeller::android::testing::TEST().
|
delete |