ANativeWindow_Buffer

表示窗口缓冲区的结构体。

摘要

可以使用 ANativeWindow_lock() 获取指向缓冲区的指针。

公共属性

bits
void *
实际的位数据。
format
int32_t
缓冲区的格式。AHardwareBuffer_Format 中的一种。
height
int32_t
垂直显示的像素数。
reserved[6]
uint32_t
请勿修改。
stride
int32_t
缓冲区中一行在内存中占用的像素数。
width
int32_t
水平显示的像素数。

公共属性

bits

android/native_window.h 中声明
void * ANativeWindow_Buffer::bits

实际的位数据。

format

android/native_window.h 中声明
int32_t ANativeWindow_Buffer::format

缓冲区的格式。AHardwareBuffer_Format 中的一种。

height

android/native_window.h 中声明
int32_t ANativeWindow_Buffer::height

垂直显示的像素数。

reserved

android/native_window.h 中声明
uint32_t ANativeWindow_Buffer::reserved[6]

请勿修改。

stride

android/native_window.h 中声明
int32_t ANativeWindow_Buffer::stride

缓冲区中一行在内存中占用的像素数。

这可能 >= width。

width

android/native_window.h 中声明
int32_t ANativeWindow_Buffer::width

水平显示的像素数。