From 17d180891f1e237ea5d25835999a8b23a6e7946d Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 11 Jun 2016 20:17:35 +0300 Subject: rename dirs --- kms++/crtc.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 kms++/crtc.h (limited to 'kms++/crtc.h') diff --git a/kms++/crtc.h b/kms++/crtc.h new file mode 100644 index 0000000..f3b525a --- /dev/null +++ b/kms++/crtc.h @@ -0,0 +1,50 @@ +#pragma once + +#include + +#include "drmpropobject.h" + +namespace kms +{ + +struct CrtcPriv; + +class Crtc : public DrmPropObject +{ + friend class Card; + friend class Connector; +public: + const std::vector& 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); + + int disable_plane(Plane* plane); + + Plane* get_primary_plane(); + + int page_flip(Framebuffer& fb, void *data); + + uint32_t buffer_id() const; + uint32_t x() const; + uint32_t y() const; + uint32_t width() const; + uint32_t height() const; + int mode_valid() const; + Videomode mode() const; + int gamma_size() const; +private: + Crtc(Card& card, uint32_t id, uint32_t idx); + ~Crtc(); + + void setup(); + void restore_mode(Connector *conn); + + CrtcPriv* m_priv; + + std::vector m_possible_planes; +}; +} -- cgit v1.2.3