diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-09-23 15:32:29 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-11-21 18:20:14 +0200 |
commit | 27856a7537f47ea7753569e3139a26b4cd62c268 (patch) | |
tree | 88c96ebce4a3d44828d8eb6daa08fc87cc2d3fab /kms++/inc | |
parent | ce3b4b2a3c58653b285a543227e5a64a3d828327 (diff) |
Add MappedFramebuffer
Add a base MappedFramebuffer class, which inherits Framebuffer and
implements IMappedFramebuffer. This helps to implement platform
specific framebuffer classes, like OmapFramebuffer.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++/inc')
-rw-r--r-- | kms++/inc/kms++/dumbframebuffer.h | 5 | ||||
-rw-r--r-- | kms++/inc/kms++/kms++.h | 1 | ||||
-rw-r--r-- | kms++/inc/kms++/mappedframebuffer.h | 21 |
3 files changed, 25 insertions, 2 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; + +}; + +} |