~emersion/go-drm

99d39c2c8490e71cefbade59d4d294ba3e65c662 — Simon Ser 1 year, 11 months ago 14dacfd
Add PlaneType
1 files changed, 21 insertions(+), 0 deletions(-)

M const.go
M const.go => const.go +21 -0
@@ 345,3 345,24 @@ func (vendor ModifierVendor) String() string {
		return "unknown"
	}
}

type PlaneType uint32

const (
	PlaneOverlay PlaneType = 0
	PlanePrimary PlaneType = 1
	PlaneCursor PlaneType = 2
)

func (t PlaneType) String() string {
	switch t {
	case PlaneOverlay:
		return "overlay"
	case PlanePrimary:
		return "primary"
	case PlaneCursor:
		return "cursor"
	default:
		return "unknown"
	}
}