summaryrefslogtreecommitdiff
path: root/libkms++/framebuffer.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@iki.fi>2015-10-02 21:27:43 +0300
committerTomi Valkeinen <tomi.valkeinen@iki.fi>2015-10-03 16:59:19 +0300
commit89bfd9d567ced945bf2f4b3a927426c1ad2ee762 (patch)
treec6d3e5450196f11bb5c58ce1c7c92956ff8c1fb7 /libkms++/framebuffer.h
parentc77756c48d6f38c8b40a39fd53f610c296530adf (diff)
Add DumbFramebuffer
Move the current Framebuffer to DumbFramebuffer, and make a simple Framebuffer as its super class.
Diffstat (limited to 'libkms++/framebuffer.h')
-rw-r--r--libkms++/framebuffer.h30
1 files changed, 5 insertions, 25 deletions
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;
};
}