diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-10-07 10:30:23 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-10-07 10:30:23 +0300 |
commit | c811a9c44cc9685211494f2daa62c9272c96eb90 (patch) | |
tree | 6fb3dee09422f2979cb4d48cb91f0ac77a719dd2 /libkmstest/testpat.cpp | |
parent | dd43e09dd207430e3fc8d3b3749f21b1aa7d304e (diff) |
libkmstest: cleanup colors and add xbgr8888 support
Diffstat (limited to 'libkmstest/testpat.cpp')
-rw-r--r-- | libkmstest/testpat.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libkmstest/testpat.cpp b/libkmstest/testpat.cpp index c8188d8..f621b91 100644 --- a/libkmstest/testpat.cpp +++ b/libkmstest/testpat.cpp @@ -24,7 +24,13 @@ static void draw_pixel(DumbFramebuffer& buf, unsigned x, unsigned y, RGB color) case PixelFormat::XRGB8888: { uint32_t *p = (uint32_t*)(buf.map(0) + buf.stride(0) * y + x * 4); - *p = color.raw; + *p = color.rgb888(); + break; + } + case PixelFormat::XBGR8888: + { + uint32_t *p = (uint32_t*)(buf.map(0) + buf.stride(0) * y + x * 4); + *p = color.bgr888(); break; } case PixelFormat::RGB565: |