summaryrefslogtreecommitdiff
path: root/kms++/framebuffer.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 20:17:35 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 20:17:35 +0300
commit17d180891f1e237ea5d25835999a8b23a6e7946d (patch)
tree5963fe4d338f6272daf55c76ed355effb47afc71 /kms++/framebuffer.h
parent38a71ee72c47f3287c327113ce411f236cac05ef (diff)
rename dirs
Diffstat (limited to 'kms++/framebuffer.h')
-rw-r--r--kms++/framebuffer.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/kms++/framebuffer.h b/kms++/framebuffer.h
new file mode 100644
index 0000000..cbf705d
--- /dev/null
+++ b/kms++/framebuffer.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include "drmobject.h"
+#include "pixelformats.h"
+
+namespace kms
+{
+class Framebuffer : public DrmObject
+{
+public:
+ Framebuffer(Card& card, uint32_t id);
+ virtual ~Framebuffer();
+
+ uint32_t width() const { return m_width; }
+ uint32_t height() const { return m_height; }
+protected:
+ Framebuffer(Card& card, uint32_t width, uint32_t height);
+
+private:
+ uint32_t m_width;
+ uint32_t m_height;
+};
+
+class IMappedFramebuffer {
+public:
+ virtual ~IMappedFramebuffer() { }
+
+ virtual uint32_t width() const = 0;
+ virtual uint32_t height() const = 0;
+
+ virtual PixelFormat format() const = 0;
+ virtual unsigned num_planes() const = 0;
+
+ virtual uint32_t stride(unsigned plane) const = 0;
+ virtual uint32_t size(unsigned plane) const = 0;
+ virtual uint32_t offset(unsigned plane) const = 0;
+ virtual uint8_t* map(unsigned plane) = 0;
+};
+
+}