avyos.dev/pkg/graphics/backend/drm
package drm
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
New
func New() *BackendNew creates a new DRM/KMS backend.
Methods
Buffer
func (b *Backend) Buffer() *core.BufferBuffer returns the back buffer for drawing.
Close
func (b *Backend) Close() errorClose restores the display and cleans up.
Flush
func (b *Backend) Flush() errorFlush copies the entire back buffer to the display.
FlushRect
func (b *Backend) FlushRect(r image.Rectangle) errorFlushRect copies a region from the back buffer to the display.
FlushRects
func (b *Backend) FlushRects(rects []image.Rectangle) errorFlushRects copies multiple regions from the back buffer to the display. This reduces per-rect overhead and allows one hardware dirty notification.
HasSystemCursor
func (b *Backend) HasSystemCursor() boolHasSystemCursor returns false.
Info
func (b *Backend) Info() stringInfo returns backend information.
Open
func (b *Backend) Open() errorOpen opens the DRM device, finds a connected display, and sets the mode.
Size
func (b *Backend) Size() (int, int)Size returns the display dimensions.