From 89bfd9d567ced945bf2f4b3a927426c1ad2ee762 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 2 Oct 2015 21:27:43 +0300 Subject: Add DumbFramebuffer Move the current Framebuffer to DumbFramebuffer, and make a simple Framebuffer as its super class. --- libkmstest/conv.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libkmstest/conv.cpp') 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 #include -#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: -- cgit v1.2.3