summaryrefslogtreecommitdiff
path: root/kms++
diff options
context:
space:
mode:
Diffstat (limited to 'kms++')
-rw-r--r--kms++/inc/kms++/dumbframebuffer.h5
-rw-r--r--kms++/inc/kms++/kms++.h1
-rw-r--r--kms++/inc/kms++/mappedframebuffer.h21
-rw-r--r--kms++/src/dumbframebuffer.cpp2
-rw-r--r--kms++/src/mappedframebuffer.cpp20
5 files changed, 46 insertions, 3 deletions
diff --git a/kms++/inc/kms++/dumbframebuffer.h b/kms++/inc/kms++/dumbframebuffer.h
index 6b3ee64..15d25d1 100644
--- a/kms++/inc/kms++/dumbframebuffer.h
+++ b/kms++/inc/kms++/dumbframebuffer.h
@@ -1,11 +1,12 @@
#pragma once
-#include "framebuffer.h"
+#include "mappedframebuffer.h"
#include "pixelformats.h"
namespace kms
{
-class DumbFramebuffer : public Framebuffer, public IMappedFramebuffer
+
+class DumbFramebuffer : public MappedFramebuffer
{
public:
DumbFramebuffer(Card& card, uint32_t width, uint32_t height, const std::string& fourcc);
diff --git a/kms++/inc/kms++/kms++.h b/kms++/inc/kms++/kms++.h
index 3365ef7..6fc6977 100644
--- a/kms++/inc/kms++/kms++.h
+++ b/kms++/inc/kms++/kms++.h
@@ -8,6 +8,7 @@
#include "framebuffer.h"
#include "dumbframebuffer.h"
#include "extframebuffer.h"
+#include "mappedframebuffer.h"
#include "plane.h"
#include "property.h"
#include "blob.h"
diff --git a/kms++/inc/kms++/mappedframebuffer.h b/kms++/inc/kms++/mappedframebuffer.h
new file mode 100644
index 0000000..ed3bc69
--- /dev/null
+++ b/kms++/inc/kms++/mappedframebuffer.h
@@ -0,0 +1,21 @@
+#pragma once
+
+namespace kms
+{
+
+class MappedFramebuffer : public Framebuffer, public IMappedFramebuffer
+{
+public:
+ virtual ~MappedFramebuffer() { }
+
+protected:
+ MappedFramebuffer(Card& card, uint32_t id);
+ MappedFramebuffer(Card& card, uint32_t width, uint32_t height);
+
+public:
+ virtual uint32_t width() const = 0;
+ virtual uint32_t height() const = 0;
+
+};
+
+}
diff --git a/kms++/src/dumbframebuffer.cpp b/kms++/src/dumbframebuffer.cpp
index b21e8ff..9de7ee1 100644
--- a/kms++/src/dumbframebuffer.cpp
+++ b/kms++/src/dumbframebuffer.cpp
@@ -25,7 +25,7 @@ DumbFramebuffer::DumbFramebuffer(Card &card, uint32_t width, uint32_t height, co
}
DumbFramebuffer::DumbFramebuffer(Card& card, uint32_t width, uint32_t height, PixelFormat format)
- :Framebuffer(card, width, height), m_format(format)
+ :MappedFramebuffer(card, width, height), m_format(format)
{
Create();
}
diff --git a/kms++/src/mappedframebuffer.cpp b/kms++/src/mappedframebuffer.cpp
new file mode 100644
index 0000000..21e082f
--- /dev/null
+++ b/kms++/src/mappedframebuffer.cpp
@@ -0,0 +1,20 @@
+#include <kms++/kms++.h>
+
+using namespace std;
+
+namespace kms
+{
+
+MappedFramebuffer::MappedFramebuffer(Card& card, uint32_t id)
+ : Framebuffer(card, id)
+{
+
+}
+
+MappedFramebuffer::MappedFramebuffer(Card& card, uint32_t width, uint32_t height)
+ : Framebuffer(card, width, height)
+{
+
+}
+
+}