1 #pragma once
3 #include <vector>
5 #include "drmobject.h"
7 namespace kms
8 {
10 struct CrtcPriv;
12 class Crtc : public DrmObject
13 {
14 public:
15 Crtc(Card& card, uint32_t id, uint32_t idx);
16 ~Crtc();
18 void setup();
20 void print_short() const;
22 const std::vector<Plane*>& get_possible_planes() const { return m_possible_planes; }
24 int set_mode(Connector* conn, Framebuffer& fb, const Videomode& mode);
26 int set_plane(Plane *plane, Framebuffer &fb,
27 int32_t dst_x, int32_t dst_y, uint32_t dst_w, uint32_t dst_h,
28 float src_x, float src_y, float src_w, float src_h);
30 private:
31 CrtcPriv* m_priv;
33 std::vector<Plane*> m_possible_planes;
34 };
35 }