From 89bfd9d567ced945bf2f4b3a927426c1ad2ee762 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 2 Oct 2015 21:27:43 +0300 Subject: Add DumbFramebuffer Move the current Framebuffer to DumbFramebuffer, and make a simple Framebuffer as its super class. --- libkms++/framebuffer.h | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'libkms++/framebuffer.h') diff --git a/libkms++/framebuffer.h b/libkms++/framebuffer.h index 2710528..33349d8 100644 --- a/libkms++/framebuffer.h +++ b/libkms++/framebuffer.h @@ -4,41 +4,21 @@ namespace kms { - class Framebuffer : public DrmObject { public: - Framebuffer(Card& card, uint32_t width, uint32_t height, const char* fourcc); - virtual ~Framebuffer(); - - void print_short() const; + Framebuffer(Card& card, uint32_t id); + virtual ~Framebuffer() { } uint32_t width() const { return m_width; } uint32_t height() const { return m_height; } - uint32_t format() const { return m_format; } - - uint8_t* map(unsigned plane) const { return m_planes[plane].map; } - uint32_t stride(unsigned plane) const { return m_planes[plane].stride; } - uint32_t size(unsigned plane) const { return m_planes[plane].size; } - void clear(); + virtual void print_short() const; +protected: + Framebuffer(Card& card, int width, int height); private: - struct FramebufferPlane { - uint32_t handle; - uint32_t size; - uint32_t stride; - uint8_t *map; - }; - - void Create(uint32_t width, uint32_t height, uint32_t format); - void Destroy(); - - unsigned m_num_planes; - struct FramebufferPlane m_planes[4]; - uint32_t m_width; uint32_t m_height; - uint32_t m_format; }; } -- cgit v1.2.3