summaryrefslogtreecommitdiff
path: root/libkms++/crtc.h
blob: ac05da9a0fc5fdd527bb9597acff737b0abc5674 (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
#pragma once

#include <vector>

#include "drmobject.h"

namespace kms
{

struct CrtcPriv;

class Crtc : public DrmObject
{
public:
	Crtc(Card& card, uint32_t id, uint32_t idx);
	~Crtc();

	void setup();

	void print_short() const;

	const std::vector<Plane*>& get_possible_planes() const { return m_possible_planes; }

	int set_mode(Connector* conn, Framebuffer& fb, const Videomode& mode);

	int set_plane(Plane *plane, Framebuffer &fb,
		      int32_t dst_x, int32_t dst_y, uint32_t dst_w, uint32_t dst_h,
		      float src_x, float src_y, float src_w, float src_h);

private:
	CrtcPriv* m_priv;

	std::vector<Plane*> m_possible_planes;
};
}