diff options
| author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2026-05-08 12:27:46 +0300 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2026-05-08 17:25:59 +0300 |
| commit | 6c7a9ada6113ea1f71bbc6780892fb3cb8c3ba3b (patch) | |
| tree | 8fb6f2370d95f204d7585713aa71e0610f97728b /utils | |
| parent | 549c347d6feb2e94a810a720c97a8bf0f57317a1 (diff) | |
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.
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/kmstest.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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)); } |
