openharmony 鸿蒙 capi-nativewindow-bufferhandle

2026-08-25 浏览 (1)

BufferHandle

typedef struct {...} BufferHandle

Overview

Describes the buffer handle, which is used to transfer and obtain buffer information. The handle contains the file descriptor, size, format, usage, virtual address, shared memory key, physical address, and custom data of the buffer.

Since: 8

Related module: NativeWindow

Header file: buffer_handle.h

Summary

Member Variables

NameDescription
int32_t fdFile descriptor of the buffer. The value -1 means that the buffer is not supported.
int32_t widthWidth of the buffer memory, in pixels.
int32_t strideStride of the buffer memory, in bytes.
int32_t heightHeight of the buffer memory, in pixels.
int32_t sizeSize of the buffer memory, in bytes.
int32_t formatFormat of the buffer memory. For details about the available options, see OH_NativeBuffer_Format.
uint64_t usageUsage of the buffer memory, represented as bit flags. For details about the available options, see OH_NativeBuffer_Format.
void* virAddrVirtual address of the buffer memory.
int32_t keyShared memory key of the buffer memory.
uint64_t phyAddrPhysical address of the buffer memory.
uint32_t reserveFdsNumber of file descriptors for extra data.
uint32_t reserveIntsNumber of integer values for extra data.
int32_t reserve[0]Extra data.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-drawing-gpu-context-h

openharmony 鸿蒙 capi-drawing-nativepixelmap-

openharmony 鸿蒙 capi-nativevsync-oh-nativevsync-expectedraterange

openharmony 鸿蒙 capi-drawing-oh-drawing-brush

openharmony 鸿蒙 capi-drawing-oh-drawing-image-info

openharmony 鸿蒙 capi-drawing-text-linetypography-h

openharmony 鸿蒙 capi-oh-nativeimage-oh-nativeimage

openharmony 鸿蒙 capi-drawing-typeface-h

openharmony 鸿蒙 capi-drawing-brush-h

openharmony 鸿蒙 capi-nativewindow

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/7Xg60FSW