summaryrefslogtreecommitdiff
path: root/kms++util/src/colorbar.cpp
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/src/colorbar.cpp
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/src/colorbar.cpp')
-rw-r--r--kms++util/src/colorbar.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kms++util/src/colorbar.cpp b/kms++util/src/colorbar.cpp
index e2d257b..c08ed9d 100644
--- a/kms++util/src/colorbar.cpp
+++ b/kms++util/src/colorbar.cpp
@@ -35,7 +35,7 @@ static const uint16_t colors16[] = {
colors32[11].rgb565(),
};
-static void drm_draw_color_bar_rgb888(IMappedFramebuffer& buf, int old_xpos, int xpos, int width)
+static void drm_draw_color_bar_rgb888(IFramebuffer& buf, int old_xpos, int xpos, int width)
{
for (unsigned y = 0; y < buf.height(); ++y) {
RGB bcol = colors32[y * ARRAY_SIZE(colors32) / buf.height()];
@@ -51,7 +51,7 @@ static void drm_draw_color_bar_rgb888(IMappedFramebuffer& buf, int old_xpos, int
}
}
-static void drm_draw_color_bar_rgb565(IMappedFramebuffer& buf, int old_xpos, int xpos, int width)
+static void drm_draw_color_bar_rgb565(IFramebuffer& buf, int old_xpos, int xpos, int width)
{
static_assert(ARRAY_SIZE(colors32) == ARRAY_SIZE(colors16), "bad colors arrays");
@@ -69,7 +69,7 @@ static void drm_draw_color_bar_rgb565(IMappedFramebuffer& buf, int old_xpos, int
}
}
-static void drm_draw_color_bar_semiplanar_yuv(IMappedFramebuffer& buf, int old_xpos, int xpos, int width)
+static void drm_draw_color_bar_semiplanar_yuv(IFramebuffer& buf, int old_xpos, int xpos, int width)
{
const uint8_t colors[] = {
0xff,
@@ -97,7 +97,7 @@ static void drm_draw_color_bar_semiplanar_yuv(IMappedFramebuffer& buf, int old_x
}
}
-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)
{
switch (buf.format()) {
case PixelFormat::NV12: