From 6c7a9ada6113ea1f71bbc6780892fb3cb8c3ba3b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 8 May 2026 12:27:46 +0300 Subject: kmstest: Use pixpat vbar for the moving flip bar Replace the hand-rolled draw_color_bar call in FlipState::draw_bar with pixpat's "vbar" pattern via a new draw_vbar_pattern helper in kms++util. The pattern fills the full buffer, so the old_xpos bookkeeping for clearing the previous bar is no longer needed. --- utils/kmstest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'utils/kmstest.cpp') diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp index cc21b92..a5adbe2 100644 --- a/utils/kmstest.cpp +++ b/utils/kmstest.cpp @@ -1034,10 +1034,9 @@ private: static void draw_bar(Framebuffer* fb, unsigned frame_num) { - int old_xpos = frame_num < s_num_buffers ? -1 : get_bar_pos(fb, frame_num - s_num_buffers); - int new_xpos = get_bar_pos(fb, frame_num); + unsigned xpos = get_bar_pos(fb, frame_num); - draw_color_bar(*fb, old_xpos, new_xpos, bar_width); + draw_vbar_pattern(*fb, xpos, bar_width); draw_text(*fb, fb->width() / 2, 0, to_string(frame_num), RGB(255, 255, 255)); } -- cgit v1.2.3