Documentation
¶
Overview ¶
Package bridge provides typed Go wrappers around the gralloc_bridge.so C functions. It is the only package that imports purego or handles raw FFI concerns.
Analogous to kernelbinder/ioctl.go which wraps raw ioctls behind typed Go functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LockGeneric ¶
func LockGeneric(h BufferHandle, width, height int32, bufSize int) ([]byte, error)
LockGeneric locks a buffer for CPU read and copies the pixel data into a Go byte slice. The buffer is unlocked before returning.
Types ¶
type BufferHandle ¶
type BufferHandle uintptr
BufferHandle is an opaque reference to an imported gralloc buffer.
func ImportBuffer ¶
func ImportBuffer(fds []int32, ints []int32) (BufferHandle, error)
ImportBuffer imports a raw gralloc buffer handle. The returned BufferHandle must be released with Free when no longer needed.
Click to show internal directories.
Click to hide internal directories.