aurorafw.android.platform.hardware_buffer

Undocumented in source.

Members

Enums

AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM
anonymousenum AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM

Buffer pixel formats.

AHARDWAREBUFFER_USAGE_CPU_READ_NEVER
anonymousenum AHARDWAREBUFFER_USAGE_CPU_READ_NEVER

Buffer usage flags, specifying how the buffer will be accessed.

Functions

AHardwareBuffer_acquire
void AHardwareBuffer_acquire(AHardwareBuffer* buffer)

Acquire a reference on the given AHardwareBuffer object. This prevents the object from being deleted until the last reference is removed.

AHardwareBuffer_allocate
int AHardwareBuffer_allocate(const(AHardwareBuffer_Desc)* desc, AHardwareBuffer** outBuffer)

Allocates a buffer that backs an AHardwareBuffer using the passed AHardwareBuffer_Desc.

AHardwareBuffer_describe
void AHardwareBuffer_describe(const(AHardwareBuffer)* buffer, AHardwareBuffer_Desc* outDesc)

Return a description of the AHardwareBuffer in the passed AHardwareBuffer_Desc struct.

AHardwareBuffer_lock
int AHardwareBuffer_lock(AHardwareBuffer* buffer, ulong usage, int fence, const(ARect)* rect, void** outVirtualAddress)

Lock the AHardwareBuffer for reading or writing, depending on the usage flags passed. This call may block if the hardware needs to finish rendering or if CPU caches need to be synchronized, or possibly for other implementation- specific reasons. If fence is not negative, then it specifies a fence file descriptor that will be signaled when the buffer is locked, otherwise the caller will block until the buffer is available.

AHardwareBuffer_recvHandleFromUnixSocket
int AHardwareBuffer_recvHandleFromUnixSocket(int socketFd, AHardwareBuffer** outBuffer)

Receive the AHardwareBuffer from an AF_UNIX socket.

AHardwareBuffer_release
void AHardwareBuffer_release(AHardwareBuffer* buffer)

Remove a reference that was previously acquired with AHardwareBuffer_acquire().

AHardwareBuffer_sendHandleToUnixSocket
int AHardwareBuffer_sendHandleToUnixSocket(const(AHardwareBuffer)* buffer, int socketFd)

Send the AHardwareBuffer to an AF_UNIX socket.

AHardwareBuffer_unlock
int AHardwareBuffer_unlock(AHardwareBuffer* buffer, int* fence)

Unlock the AHardwareBuffer; must be called after all changes to the buffer are completed by the caller. If fence is not NULL then it will be set to a file descriptor that is signaled when all pending work on the buffer is completed. The caller is responsible for closing the fence when it is no longer needed.

Structs

AHardwareBuffer
struct AHardwareBuffer

@file aurorafw/android/platform/hardware_buffer.d

AHardwareBuffer_Desc
struct AHardwareBuffer_Desc

Buffer description. Used for allocating new buffers and querying parameters of existing ones.

Meta