AHardwareBuffer_Desc

Buffer description.

Summary

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

Public attributes

format
uint32_t
One of AHardwareBuffer_Format.
height
uint32_t
Height in pixels.
layers
uint32_t
Number of images in an image array.
rfu0
uint32_t
Initialize to zero, reserved for future use.
rfu1
uint64_t
Initialize to zero, reserved for future use.
stride
uint32_t
Row stride in pixels, ignored for AHardwareBuffer_allocate()
usage
uint64_t
Combination of AHardwareBuffer_UsageFlags.
width
uint32_t
Width in pixels.

Public attributes

format

Declared in android/hardware_buffer.h
uint32_t AHardwareBuffer_Desc::format

One of AHardwareBuffer_Format.

height

Declared in android/hardware_buffer.h
uint32_t AHardwareBuffer_Desc::height

Height in pixels.

layers

Declared in android/hardware_buffer.h
uint32_t AHardwareBuffer_Desc::layers

Number of images in an image array.

AHardwareBuffers with one layer correspond to regular 2D textures. AHardwareBuffers with more than layer correspond to texture arrays. If the layer count is a multiple of 6 and the usage flag AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP is present, the buffer is a cube map or a cube map array.

rfu0

Declared in android/hardware_buffer.h
uint32_t AHardwareBuffer_Desc::rfu0

Initialize to zero, reserved for future use.

rfu1

Declared in android/hardware_buffer.h
uint64_t AHardwareBuffer_Desc::rfu1

Initialize to zero, reserved for future use.

stride

Declared in android/hardware_buffer.h
uint32_t AHardwareBuffer_Desc::stride

Row stride in pixels, ignored for AHardwareBuffer_allocate()

usage

Declared in android/hardware_buffer.h
uint64_t AHardwareBuffer_Desc::usage

Combination of AHardwareBuffer_UsageFlags.

width

Declared in android/hardware_buffer.h
uint32_t AHardwareBuffer_Desc::width

Width in pixels.