Documentation
¶
Overview ¶
Package hidlalloc implements the HIDL gralloc 3.0 IAllocator client for buffer allocation via hwbinder.
The emulator's camera HAL uses android.hardware.graphics.allocator@3.0 which runs on /dev/hwbinder. This package opens a separate hwbinder connection, looks up the allocator service via hwservicemanager, and calls allocate() with a BufferDescriptor constructed using the ranchu/goldfish encoding format.
BufferDescriptor format (goldfish/ranchu):
[0] width [1] height [2] layerCount [3] format (PixelFormat as uint32) [4] usage (low 32 bits of BufferUsage)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllocateResult ¶
type AllocateResult struct {
// Error is the gralloc error code (0 = NONE).
Error int32
// Stride is the number of pixels between consecutive rows.
Stride int32
// Fds holds the file descriptors from the allocated native_handle.
Fds []int32
// Ints holds the integer data from the allocated native_handle.
Ints []int32
}
AllocateResult holds the result of a gralloc 3.0 allocate() call.
Click to show internal directories.
Click to hide internal directories.