avyos.dev/pkg/graphics/backend/drm
package drm
Package Overview
No package-level documentation is provided.
| Export Group | Count |
|---|---|
| Constants | 0 |
| Variables | 0 |
| Functions | 0 |
| Types | 1 |
Types
Backend
type Backend struct {
// contains filtered or unexported fields
}Backend is a DRM/KMS display backend.
Functions
func New() *BackendNew creates a new DRM/KMS backend.
Methods
func (b *Backend) Buffer() *graphics.BufferBuffer returns the back buffer for drawing.
func (b *Backend) Close() errorClose restores the display and cleans up.
func (b *Backend) Flush() errorFlush copies the entire back buffer to the display.
func (b *Backend) FlushRect(r graphics.Rect) errorFlushRect copies a region from the back buffer to the display.
func (b *Backend) FlushRects(rects []graphics.Rect) errorFlushRects copies multiple regions from the back buffer to the display. This reduces per-rect overhead and allows one hardware dirty notification.
func (b *Backend) HasSystemCursor() boolHasSystemCursor returns false.
func (b *Backend) Info() stringInfo returns backend information.
func (b *Backend) Open() errorOpen opens the DRM device, finds a connected display, and sets the mode.
func (b *Backend) Size() (int, int)Size returns the display dimensions.