aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen2016-08-15 09:39:25 -0500
committerTomi Valkeinen2016-08-15 09:39:25 -0500
commita7797a1361e72860072d84139bed316975572517 (patch)
tree07221c47c0558691108772c24a24b4cd4c322ed9 /kms++util
parent05cc861d51149c719bcef145365e89a00ddb6cde (diff)
parent13883ffaa3e04c4ab465581127411feb4dce1b89 (diff)
downloadexternal-kmsxx-a7797a1361e72860072d84139bed316975572517.tar.gz
external-kmsxx-a7797a1361e72860072d84139bed316975572517.tar.xz
external-kmsxx-a7797a1361e72860072d84139bed316975572517.zip
Merge branch 'master' of git://github.com/jsarha/kmsxx
Diffstat (limited to 'kms++util')
-rw-r--r--kms++util/src/drawing.cpp8
-rw-r--r--kms++util/src/testpat.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/kms++util/src/drawing.cpp b/kms++util/src/drawing.cpp
index 44634e1..f8cc03f 100644
--- a/kms++util/src/drawing.cpp
+++ b/kms++util/src/drawing.cpp
@@ -26,17 +26,17 @@ void draw_rgb_pixel(IMappedFramebuffer& buf, unsigned x, unsigned y, RGB color)
26 case PixelFormat::RGB888: 26 case PixelFormat::RGB888:
27 { 27 {
28 uint8_t *p = buf.map(0) + buf.stride(0) * y + x * 3; 28 uint8_t *p = buf.map(0) + buf.stride(0) * y + x * 3;
29 p[0] = color.r; 29 p[0] = color.b;
30 p[1] = color.g; 30 p[1] = color.g;
31 p[2] = color.b; 31 p[2] = color.r;
32 break; 32 break;
33 } 33 }
34 case PixelFormat::BGR888: 34 case PixelFormat::BGR888:
35 { 35 {
36 uint8_t *p = buf.map(0) + buf.stride(0) * y + x * 3; 36 uint8_t *p = buf.map(0) + buf.stride(0) * y + x * 3;
37 p[0] = color.b; 37 p[0] = color.r;
38 p[1] = color.g; 38 p[1] = color.g;
39 p[2] = color.r; 39 p[2] = color.b;
40 break; 40 break;
41 } 41 }
42 case PixelFormat::RGB565: 42 case PixelFormat::RGB565:
diff --git a/kms++util/src/testpat.cpp b/kms++util/src/testpat.cpp
index 1297e61..519f960 100644
--- a/kms++util/src/testpat.cpp
+++ b/kms++util/src/testpat.cpp
@@ -105,7 +105,9 @@ static void draw_test_pattern_part(IMappedFramebuffer& fb, unsigned start_y, uns
105 case PixelFormat::ARGB8888: 105 case PixelFormat::ARGB8888:
106 case PixelFormat::ABGR8888: 106 case PixelFormat::ABGR8888:
107 case PixelFormat::RGB888: 107 case PixelFormat::RGB888:
108 case PixelFormat::BGR888:
108 case PixelFormat::RGB565: 109 case PixelFormat::RGB565:
110 case PixelFormat::BGR565:
109 for (y = start_y; y < end_y; y++) { 111 for (y = start_y; y < end_y; y++) {
110 for (x = 0; x < w; x++) { 112 for (x = 0; x < w; x++) {
111 RGB pixel = get_test_pattern_pixel(fb, x, y); 113 RGB pixel = get_test_pattern_pixel(fb, x, y);