自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
gralloc_module_t 结构体参考文档
#include <
gralloc.h
>
|
struct
hw_module_t
|
常见
|
|
int(*
|
registerBuffer
)(struct
gralloc_module_t
const *module, buffer_handle_t handle)
|
|
int(*
|
unregisterBuffer
)(struct
gralloc_module_t
const *module, buffer_handle_t handle)
|
|
int(*
|
lock
)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int usage, int l, int t, int w, int h, void **vaddr)
|
|
int(*
|
unlock
)(struct
gralloc_module_t
const *module, buffer_handle_t handle)
|
|
int(*
|
perform
)(struct
gralloc_module_t
const *module, int operation,...)
|
|
int(*
|
lock_ycbcr
)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int usage, int l, int t, int w, int h, struct android_ycbcr *ycbcr)
|
|
int(*
|
lockAsync
)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int usage, int l, int t, int w, int h, void **vaddr, int fenceFd)
|
|
int(*
|
unlockAsync
)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int *fenceFd)
|
|
int(*
|
lockAsync_ycbcr
)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int usage, int l, int t, int w, int h, struct android_ycbcr *ycbcr, int fenceFd)
|
|
void *
|
reserved_proc
[3]
|
|
每个硬件模块都必须有一个名为 HAL_MODULE_INFO_SYM 的数据结构,并且此数据结构的字段必须以
hw_module_t
开头,后跟模块专用信息。
定义位于文件
gralloc.h
的第 155 行
。
int(* lock)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int usage, int l, int t, int w, int h, void **vaddr)
|
int(* lock_ycbcr)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int usage, int l, int t, int w, int h, struct android_ycbcr *ycbcr)
|
int(* lockAsync)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int usage, int l, int t, int w, int h, void **vaddr, int fenceFd)
|
int(* lockAsync_ycbcr)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int usage, int l, int t, int w, int h, struct android_ycbcr *ycbcr, int fenceFd)
|
int(* registerBuffer)(struct
gralloc_module_t
const *module, buffer_handle_t handle)
|
int(* unlockAsync)(struct
gralloc_module_t
const *module, buffer_handle_t handle, int *fenceFd)
|
int(* unregisterBuffer)(struct
gralloc_module_t
const *module, buffer_handle_t handle)
|
此结构体的文档是根据以下文件生成的:
-
hardware/libhardware/include/hardware/
gralloc.h
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-26。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-26。"],[],[]]