Documentation
¶
Overview ¶
Package dmabuf describes Linux dma-buf frames: GPU (or udmabuf) memory handed to the compositor by file descriptor through zwp_linux_dmabuf_v1, with no copy. capture fills them with screen contents; widget.GPUArea presents them.
Index ¶
Constants ¶
const ( // FormatXRGB8888 is DRM_FORMAT_XRGB8888 ('XR24'). FormatXRGB8888 uint32 = 0x34325258 // FormatARGB8888 is DRM_FORMAT_ARGB8888 ('AR24'). FormatARGB8888 uint32 = 0x34325241 // ModifierLinear is DRM_FORMAT_MOD_LINEAR. ModifierLinear uint64 = 0 // ModifierInvalid is DRM_FORMAT_MOD_INVALID: an implicit, // driver-chosen layout. ModifierInvalid uint64 = 0x00ffffffffffffff )
DRM fourcc formats and modifiers the lys packages name; any other DRM code works the same way.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
Width, Height int
// Format is the DRM fourcc.
Format uint32
// Modifier is the DRM format modifier.
Modifier uint64
Planes []Plane
}
Buffer describes a dmabuf. The caller allocates it (gbm, a DRM dumb buffer, udmabuf) and keeps the plane fds open for as long as the compositor-side buffer lives; importing dups nothing. The planes must be the ones Format calls for.