Merge branch 'master' of git://github.com/jsarha/kmsxx
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 15 Aug 2016 14:39:25 +0000 (17:39 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 15 Aug 2016 14:39:25 +0000 (17:39 +0300)
kms++util/src/drawing.cpp
kms++util/src/testpat.cpp

index 44634e170683d6a68bf7fc66dc2e5b719d4e98f2..f8cc03fb56413a17469f25134f2503cb10e77a3c 100644 (file)
@@ -26,17 +26,17 @@ void draw_rgb_pixel(IMappedFramebuffer& buf, unsigned x, unsigned y, RGB color)
        case PixelFormat::RGB888:
        {
                uint8_t *p = buf.map(0) + buf.stride(0) * y + x * 3;
-               p[0] = color.r;
+               p[0] = color.b;
                p[1] = color.g;
-               p[2] = color.b;
+               p[2] = color.r;
                break;
        }
        case PixelFormat::BGR888:
        {
                uint8_t *p = buf.map(0) + buf.stride(0) * y + x * 3;
-               p[0] = color.b;
+               p[0] = color.r;
                p[1] = color.g;
-               p[2] = color.r;
+               p[2] = color.b;
                break;
        }
        case PixelFormat::RGB565:
index 1297e61730ec18d8d08a0c8c52b280fb7c20ef31..519f960ec700bc8470404c9d98f22dc8e27e135b 100644 (file)
@@ -105,7 +105,9 @@ static void draw_test_pattern_part(IMappedFramebuffer& fb, unsigned start_y, uns
        case PixelFormat::ARGB8888:
        case PixelFormat::ABGR8888:
        case PixelFormat::RGB888:
+       case PixelFormat::BGR888:
        case PixelFormat::RGB565:
+       case PixelFormat::BGR565:
                for (y = start_y; y < end_y; y++) {
                        for (x = 0; x < w; x++) {
                                RGB pixel = get_test_pattern_pixel(fb, x, y);