avyos.dev/pkg/graphics/backend/drm

package drm

Package Overview

No package-level documentation is provided.

Export GroupCount
Constants0
Variables0
Functions0
Types1

Types

Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend is a DRM/KMS display backend.

Functions

func New() *Backend

New creates a new DRM/KMS backend.

Methods

func (b *Backend) Buffer() *graphics.Buffer

Buffer returns the back buffer for drawing.

func (b *Backend) Close() error

Close restores the display and cleans up.

func (b *Backend) Flush() error

Flush copies the entire back buffer to the display.

func (b *Backend) FlushRect(r graphics.Rect) error

FlushRect copies a region from the back buffer to the display.

func (b *Backend) FlushRects(rects []graphics.Rect) error

FlushRects 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() bool

HasSystemCursor returns false.

func (b *Backend) Info() string

Info returns backend information.

func (b *Backend) Open() error

Open opens the DRM device, finds a connected display, and sets the mode.

func (b *Backend) Size() (int, int)

Size returns the display dimensions.