Skip to content

Commit 3c53f1e

Browse files
committed
utils: c_draw_test_pattern() takes format name, not fourcc
We can generate test patterns for pixel formats not in DRM, so we can't take DRM fourcc as a parameter for c_draw_test_pattern(). Switch it to format name instead. This is a ABI change, but it is marked as super experimental. Also, it feels a bit odd to add non-DRM format handling to kms++. But it feels a bit pointless to split the testpat generation to a separate library. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
1 parent ae5ef45 commit 3c53f1e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kms++util/inc/kms++util/kms++util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ extern "C" {
9090
struct CDrawTestPatternParameters {
9191
uint32_t width;
9292
uint32_t height;
93-
uint32_t fourcc;;
93+
const char* format_name;
9494
uint8_t* buffers[4];
9595
uint32_t sizes[4];
9696
uint32_t pitches[4];

kms++util/src/testpat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ int c_draw_test_pattern(struct CDrawTestPatternParameters* params)
500500
using namespace kms;
501501

502502
try {
503-
auto fmt = fourcc_to_pixel_format(params->fourcc);
503+
auto fmt = find_pixel_format_by_name(params->format_name);
504504

505505
ExtCPUFramebuffer fb(params->width,
506506
params->height,

0 commit comments

Comments
 (0)