Stay organized with collections
Save and categorize content based on your preferences.
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
|
usage
|
uint64_t
Combination of AHardwareBuffer_UsageFlags.
|
width
|
uint32_t
Width in pixels.
|
Public attributes
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
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
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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-11-19 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-19 UTC."],[],[],null,["# AHardwareBuffer_Desc Struct Reference\n\nAHardwareBuffer_Desc\n====================\n\nBuffer description.\n\nSummary\n-------\n\nUsed for allocating new buffers and querying parameters of existing ones.\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [format](#struct_a_hardware_buffer___desc_1a9f45951ac62fde8853ea35d702bdc5c0) | `uint32_t` One of AHardwareBuffer_Format. |\n| [height](#struct_a_hardware_buffer___desc_1aa0295d5d309fa7c8495e07f46e464392) | `uint32_t` Height in pixels. |\n| [layers](#struct_a_hardware_buffer___desc_1ae988cf43a097be4d64e4a35f9a8418f8) | `uint32_t` Number of images in an image array. |\n| [rfu0](#struct_a_hardware_buffer___desc_1a14c7895474103482ada5f2444a92b523) | `uint32_t` Initialize to zero, reserved for future use. |\n| [rfu1](#struct_a_hardware_buffer___desc_1a429fdc6946a018e527ba72505f51f4f7) | `uint64_t` Initialize to zero, reserved for future use. |\n| [stride](#struct_a_hardware_buffer___desc_1a62b246ff72e1763eb848f6499e12fe86) | `uint32_t` Row stride in pixels, ignored for [AHardwareBuffer_allocate()](/ndk/reference/group/a-hardware-buffer#group___a_hardware_buffer_1ga287478029a8f416b75db68a11e1eb5e0) |\n| [usage](#struct_a_hardware_buffer___desc_1aa1621ae2923db99c9321dddb9be0fbe7) | `uint64_t` Combination of AHardwareBuffer_UsageFlags. |\n| [width](#struct_a_hardware_buffer___desc_1afa2cf0d8c461c5fec7f1a588f7b0d9ef) | `uint32_t` Width in pixels. |\n\nPublic attributes\n-----------------\n\n### format\n\nDeclared in `android/hardware_buffer.h` \n\n```scdoc\nuint32_t AHardwareBuffer_Desc::format\n``` \nOne of AHardwareBuffer_Format. \n\n### height\n\nDeclared in `android/hardware_buffer.h` \n\n```scdoc\nuint32_t AHardwareBuffer_Desc::height\n``` \nHeight in pixels. \n\n### layers\n\nDeclared in `android/hardware_buffer.h` \n\n```scdoc\nuint32_t AHardwareBuffer_Desc::layers\n``` \nNumber of images in an image array.\n\nAHardwareBuffers 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. \n\n### rfu0\n\nDeclared in `android/hardware_buffer.h` \n\n```scdoc\nuint32_t AHardwareBuffer_Desc::rfu0\n``` \nInitialize to zero, reserved for future use. \n\n### rfu1\n\nDeclared in `android/hardware_buffer.h` \n\n```scdoc\nuint64_t AHardwareBuffer_Desc::rfu1\n``` \nInitialize to zero, reserved for future use. \n\n### stride\n\nDeclared in `android/hardware_buffer.h` \n\n```scdoc\nuint32_t AHardwareBuffer_Desc::stride\n``` \nRow stride in pixels, ignored for [AHardwareBuffer_allocate()](/ndk/reference/group/a-hardware-buffer#group___a_hardware_buffer_1ga287478029a8f416b75db68a11e1eb5e0) \n\n### usage\n\nDeclared in `android/hardware_buffer.h` \n\n```scdoc\nuint64_t AHardwareBuffer_Desc::usage\n``` \nCombination of AHardwareBuffer_UsageFlags. \n\n### width\n\nDeclared in `android/hardware_buffer.h` \n\n```scdoc\nuint32_t AHardwareBuffer_Desc::width\n``` \nWidth in pixels."]]