A partir de 2026, para alinhar com nosso modelo de desenvolvimento estável de tronco e garantir a estabilidade da plataforma para o ecossistema, vamos publicar o código-fonte no AOSP no segundo e quarto trimestres. Para criar e contribuir com o AOSP, recomendamos usar android-latest-release em vez de aosp-main. O branch de manifesto android-latest-release sempre vai fazer referência à versão mais recente enviada ao AOSP. Para mais informações, consulte Mudanças no AOSP.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Referência da estrutura gralloc_module_t
#include <
gralloc.h
>
|
|
|
struct
hw_module_t
|
comum
|
|
|
|
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]
|
|
|
Cada módulo de hardware precisa ter uma estrutura de dados chamada HAL_MODULE_INFO_SYM, e os campos dessa estrutura precisam começar com
hw_module_t
seguidos de informações específicas do módulo.
Definição na linha
155
do arquivo
gralloc.h
.
|
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)
|
A documentação desse struct foi gerada com base no seguinte arquivo:
-
hardware/libhardware/include/hardware/
gralloc.h
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[null,null,["Última atualização 2025-07-27 UTC."],[],[]]