LVGLTest: use subwindow so everything gets cleaned

This commit is contained in:
Thomas Farstrike
2025-04-22 14:36:58 +02:00
parent fe79177485
commit d915f3a62c
+4 -4
View File
@@ -15,11 +15,11 @@ canary.add_flag(0x0001) # LV_OBJ_FLAG_HIDDEN is 0x0001
def add_spinner_and_update():
global spinner_count, metrics_label
try:
spinner = lv.spinner(lv.screen_active())
spinner = lv.spinner(subwindow)
spinner.set_size(SPINNER_SIZE, SPINNER_SIZE)
spinner.set_pos(
random.randint(0, lv.screen_active().get_width() - SPINNER_SIZE),
random.randint(0, lv.screen_active().get_height() - SPINNER_SIZE)
random.randint(0, subwindow.get_width() - SPINNER_SIZE),
random.randint(0, subwindow.get_height() - SPINNER_SIZE)
)
spinner_count += 1
except Exception as e:
@@ -33,7 +33,7 @@ def run_benchmark():
global spinner_count, metrics_label
print("Starting LVGL spinner benchmark...")
scr = lv.screen_active()
scr = subwindow
scr.set_style_bg_color(lv.color_black(), 0)
metrics_label = lv.label(scr)