summaryrefslogtreecommitdiff
path: root/libkmstest/conv.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@iki.fi>2015-10-02 21:27:43 +0300
committerTomi Valkeinen <tomi.valkeinen@iki.fi>2015-10-03 16:59:19 +0300
commit89bfd9d567ced945bf2f4b3a927426c1ad2ee762 (patch)
treec6d3e5450196f11bb5c58ce1c7c92956ff8c1fb7 /libkmstest/conv.cpp
parentc77756c48d6f38c8b40a39fd53f610c296530adf (diff)
Add DumbFramebuffer
Move the current Framebuffer to DumbFramebuffer, and make a simple Framebuffer as its super class.
Diffstat (limited to 'libkmstest/conv.cpp')
-rw-r--r--libkmstest/conv.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libkmstest/conv.cpp b/libkmstest/conv.cpp
index d439253..b716020 100644
--- a/libkmstest/conv.cpp
+++ b/libkmstest/conv.cpp
@@ -1,13 +1,13 @@
#include <drm_fourcc.h>
#include <stdexcept>
-#include "framebuffer.h"
+#include "dumbframebuffer.h"
#include "color.h"
#include "conv.h"
namespace kms
{
-static RGB read_rgb(const Framebuffer& fb, int x, int y)
+static RGB read_rgb(const DumbFramebuffer& fb, int x, int y)
{
uint32_t *pc = (uint32_t *)(fb.map(0) + fb.stride(0) * y);
@@ -16,13 +16,13 @@ static RGB read_rgb(const Framebuffer& fb, int x, int y)
return RGB((c >> 16) & 0xff, (c >> 8) & 0xff, c & 0xff);
}
-static YUV read_rgb_as_yuv(const Framebuffer& fb, int x, int y)
+static YUV read_rgb_as_yuv(const DumbFramebuffer& fb, int x, int y)
{
RGB rgb = read_rgb(fb, x, y);
return YUV(rgb);
}
-static void fb_rgb_to_packed_yuv(Framebuffer& dst_fb, const Framebuffer& src_fb)
+static void fb_rgb_to_packed_yuv(DumbFramebuffer& dst_fb, const DumbFramebuffer& src_fb)
{
unsigned w = src_fb.width();
unsigned h = src_fb.height();
@@ -57,7 +57,7 @@ static void fb_rgb_to_packed_yuv(Framebuffer& dst_fb, const Framebuffer& src_fb)
}
}
-static void fb_rgb_to_semiplanar_yuv(Framebuffer& dst_fb, const Framebuffer& src_fb)
+static void fb_rgb_to_semiplanar_yuv(DumbFramebuffer& dst_fb, const DumbFramebuffer& src_fb)
{
unsigned w = src_fb.width();
unsigned h = src_fb.height();
@@ -92,7 +92,7 @@ static void fb_rgb_to_semiplanar_yuv(Framebuffer& dst_fb, const Framebuffer& src
}
}
-static void fb_rgb_to_rgb565(Framebuffer& dst_fb, const Framebuffer& src_fb)
+static void fb_rgb_to_rgb565(DumbFramebuffer& dst_fb, const DumbFramebuffer& src_fb)
{
unsigned w = src_fb.width();
unsigned h = src_fb.height();
@@ -114,7 +114,7 @@ static void fb_rgb_to_rgb565(Framebuffer& dst_fb, const Framebuffer& src_fb)
}
}
-void color_convert(Framebuffer& dst, const Framebuffer &src)
+void color_convert(DumbFramebuffer& dst, const DumbFramebuffer &src)
{
switch (dst.format()) {
case DRM_FORMAT_NV12: