summaryrefslogtreecommitdiff
path: root/kms++util/inc
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-10-03 12:32:52 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-10-03 12:33:11 +0300
commitfab9bb700372008130e5026fa9fe5fd22ac6ec4e (patch)
tree1e83b437762697ab833bd8c22896b8733593ca5f /kms++util/inc
parent33f343d18d5d1886dd04314bded1781c3e46f7e7 (diff)
Rework framebuffer classes
Drop (I)MappedFramebuffer, as it doesn't really provide any value, and have most of the methods be present in IFramebuffer with default exception throwing implementation. This gives us simpler way to use the framebuffers, as almost always we can just use a pointer to IFramebuffer.
Diffstat (limited to 'kms++util/inc')
-rw-r--r--kms++util/inc/kms++util/cpuframebuffer.h2
-rw-r--r--kms++util/inc/kms++util/extcpuframebuffer.h2
-rw-r--r--kms++util/inc/kms++util/kms++util.h16
3 files changed, 10 insertions, 10 deletions
diff --git a/kms++util/inc/kms++util/cpuframebuffer.h b/kms++util/inc/kms++util/cpuframebuffer.h
index 1498528..4273e0d 100644
--- a/kms++util/inc/kms++util/cpuframebuffer.h
+++ b/kms++util/inc/kms++util/cpuframebuffer.h
@@ -5,7 +5,7 @@
namespace kms
{
-class CPUFramebuffer : public IMappedFramebuffer {
+class CPUFramebuffer : public IFramebuffer {
public:
CPUFramebuffer(uint32_t width, uint32_t height, PixelFormat format);
diff --git a/kms++util/inc/kms++util/extcpuframebuffer.h b/kms++util/inc/kms++util/extcpuframebuffer.h
index 3652ec4..92ca43a 100644
--- a/kms++util/inc/kms++util/extcpuframebuffer.h
+++ b/kms++util/inc/kms++util/extcpuframebuffer.h
@@ -5,7 +5,7 @@
namespace kms
{
-class ExtCPUFramebuffer : public IMappedFramebuffer
+class ExtCPUFramebuffer : public IFramebuffer
{
public:
ExtCPUFramebuffer(uint32_t width, uint32_t height, PixelFormat format,
diff --git a/kms++util/inc/kms++util/kms++util.h b/kms++util/inc/kms++util/kms++util.h
index d45497e..8e45b0d 100644
--- a/kms++util/inc/kms++util/kms++util.h
+++ b/kms++util/inc/kms++util/kms++util.h
@@ -15,18 +15,18 @@
namespace kms
{
-class IMappedFramebuffer;
+class IFramebuffer;
-void draw_rgb_pixel(IMappedFramebuffer& buf, unsigned x, unsigned y, RGB color);
-void draw_yuv422_macropixel(IMappedFramebuffer& buf, unsigned x, unsigned y, YUV yuv1, YUV yuv2);
-void draw_yuv420_macropixel(IMappedFramebuffer& buf, unsigned x, unsigned y,
+void draw_rgb_pixel(IFramebuffer& buf, unsigned x, unsigned y, RGB color);
+void draw_yuv422_macropixel(IFramebuffer& buf, unsigned x, unsigned y, YUV yuv1, YUV yuv2);
+void draw_yuv420_macropixel(IFramebuffer& buf, unsigned x, unsigned y,
YUV yuv1, YUV yuv2, YUV yuv3, YUV yuv4);
-void draw_rect(IMappedFramebuffer &fb, uint32_t x, uint32_t y, uint32_t w, uint32_t h, RGB color);
-void draw_text(IMappedFramebuffer& buf, uint32_t x, uint32_t y, const std::string& str, RGB color);
+void draw_rect(IFramebuffer &fb, uint32_t x, uint32_t y, uint32_t w, uint32_t h, RGB color);
+void draw_text(IFramebuffer& buf, uint32_t x, uint32_t y, const std::string& str, RGB color);
-void draw_color_bar(IMappedFramebuffer& buf, int old_xpos, int xpos, int width);
+void draw_color_bar(IFramebuffer& buf, int old_xpos, int xpos, int width);
-void draw_test_pattern(IMappedFramebuffer &fb, YUVType yuvt = YUVType::BT601_Lim);
+void draw_test_pattern(IFramebuffer &fb, YUVType yuvt = YUVType::BT601_Lim);
}
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))