#include #include #include #include #include #include "kms++.h" using namespace std; namespace kms { Framebuffer::Framebuffer(Card& card, int width, int height) : DrmObject(card, DRM_MODE_OBJECT_FB), m_width(width), m_height(height) { } Framebuffer::Framebuffer(Card& card, uint32_t id) : DrmObject(card, id, DRM_MODE_OBJECT_FB) { auto fb = drmModeGetFB(card.fd(), id); m_width = fb->width; m_height = fb->height; drmModeFreeFB(fb); } void Framebuffer::print_short() const { printf("Framebuffer %d\n", id()); } }