1# BufferHandle 2<!--Kit: ArkGraphics 2D--> 3<!--Subsystem: Graphics--> 4<!--Owner: @Felix-fangyang; @li_hui180; @dingpy--> 5<!--Designer: @conan13234--> 6<!--Tester: @nobuggers--> 7<!--Adviser: @ge-yafang--> 8## 概述 9 10缓冲区句柄,用于对缓冲区的信息传递和获取。句柄包含了缓冲区的文件描述符、尺寸、格式、用途、虚拟地址、共享内存键、物理地址、自定义数据。 11 12**起始版本:** 8 13 14**相关模块:** [NativeWindow](capi-nativewindow.md) 15 16**所在头文件:** [buffer_handle.h](capi-buffer-handle-h.md) 17 18## 汇总 19 20### 成员变量 21 22| 名称 | 描述 | 23| -- | -- | 24| int32_t fd | 缓冲区文件描述符,若不支持则为-1。 | 25| int32_t width | 缓冲区内存的宽度,单位为像素。 | 26| int32_t stride | 缓冲区内存的步幅,单位为字节。 | 27| int32_t height | 缓冲区内存的高度,单位为像素。 | 28| int32_t size | 缓冲区内存的大小,单位为字节。 | 29| int32_t format | 缓冲区内存的格式,取值具体可见[OH_NativeBuffer_Format](capi-native-buffer-h.md#oh_nativebuffer_format)枚举值。 | 30| uint64_t usage | 缓冲区内存的用途,按位标志位,取值具体可见[OH_NativeBuffer_Format](capi-native-buffer-h.md#oh_nativebuffer_format)枚举值。 | 31| void* virAddr | 缓冲区内存的虚拟地址。 | 32| int32_t key | 缓冲区共享内存键值。 | 33| uint64_t phyAddr | 缓冲区内存的物理地址。 | 34| uint32_t reserveFds | 额外数据的文件描述符数量。 | 35| uint32_t reserveInts | 额外数据的整型值数量。 | 36| int32_t reserve[0] | 额外数据。 |