summaryrefslogtreecommitdiff
path: root/kms++/plane.h
blob: d50e5395c6107ffa5005ae296cce365e7176e5c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once

#include "drmpropobject.h"

namespace kms
{

enum class PlaneType
{
	Overlay = 0,
	Primary = 1,
	Cursor = 2,
};

struct PlanePriv;

class Plane : public DrmPropObject
{
	friend class Card;
public:
	bool supports_crtc(Crtc* crtc) const;
	bool supports_format(PixelFormat fmt) const;

	PlaneType plane_type() const;

	std::vector<PixelFormat> get_formats() const;
	uint32_t crtc_id() const;
	uint32_t fb_id() const;

	uint32_t crtc_x() const;
	uint32_t crtc_y() const;
	uint32_t x() const;
	uint32_t y() const;
	uint32_t gamma_size() const;
private:
	Plane(Card& card, uint32_t id, uint32_t idx);
	~Plane();

	PlanePriv* m_priv;
};
}