diff options
Diffstat (limited to 'libkms++/plane.cpp')
-rw-r--r-- | libkms++/plane.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libkms++/plane.cpp b/libkms++/plane.cpp index 93567f1..3ad3ddf 100644 --- a/libkms++/plane.cpp +++ b/libkms++/plane.cpp @@ -75,4 +75,51 @@ PlaneType Plane::plane_type() const else return PlaneType::Overlay; } + +vector<PixelFormat> Plane::get_formats() const +{ + auto p = m_priv->drm_plane; + vector<PixelFormat> r; + + for (unsigned i = 0; i < p->count_formats; ++i) + r.push_back((PixelFormat) p->formats[i]); + + return r; +} + +uint32_t Plane::crtc_id() const +{ + return m_priv->drm_plane->crtc_id; +} + +uint32_t Plane::fb_id() const +{ + return m_priv->drm_plane->fb_id; +} + +uint32_t Plane::crtc_x() const +{ + return m_priv->drm_plane->crtc_x; +} + +uint32_t Plane::crtc_y() const +{ + return m_priv->drm_plane->crtc_y; +} + +uint32_t Plane::x() const +{ + return m_priv->drm_plane->x; +} + +uint32_t Plane::y() const +{ + return m_priv->drm_plane->y; +} + +uint32_t Plane::gamma_size() const +{ + return m_priv->drm_plane->gamma_size; +} + } |