summaryrefslogtreecommitdiff
path: root/libkms++/framebuffer.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-03-15 11:46:09 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-03-15 11:57:49 +0200
commit83d27aa30549194068fef320f735245a7735a5ea (patch)
tree05d8d4e6bb36c1b902f9fcb19a79ea9b9573ed28 /libkms++/framebuffer.h
parent79394ef6686cd525471c20f9bda0b8c983b63010 (diff)
Add IMappedFramebuffer and remove MappedBuffer
Diffstat (limited to 'libkms++/framebuffer.h')
-rw-r--r--libkms++/framebuffer.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libkms++/framebuffer.h b/libkms++/framebuffer.h
index 77a6c32..25659c6 100644
--- a/libkms++/framebuffer.h
+++ b/libkms++/framebuffer.h
@@ -1,6 +1,7 @@
#pragma once
#include "drmobject.h"
+#include "pixelformats.h"
namespace kms
{
@@ -19,4 +20,21 @@ 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;
+};
+
}