mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
perf(l2): the screen under a popup is frozen, not redrawn
Once a popup's dim is up, the screen below is drawn once into an image (LV_USE_SNAPSHOT), darkened as the dim layer darkens it, and shown opaque over the screen with the dim layer cleared. LVGL then starts drawing from that image; an lv_image with no background never reports that it covers, so it answers the cover check itself. A full frame under a popup: 45.7 -> 32.6 ms; freezing costs ~29 ms once, as the popup settles. One popup at a time (a second one dims live), a strip keeps the status bar dimmed under top-layer popups, the image goes with its popup, and the popup dims live again if its screen goes first. POP_BOTTOM (over a live map) isn't frozen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,9 +40,9 @@ namespace anim {
|
||||
}
|
||||
|
||||
// A popup: the dimmed backdrop fades up to `dim`, its first child (the
|
||||
// panel) rises.
|
||||
static void popup(lv_obj_t* overlay, lv_opa_t dim = LV_OPA_60) {
|
||||
run(overlay, setBgOpa, LV_OPA_TRANSP, dim, POP_MS);
|
||||
// panel) rises; `done` runs once it's up.
|
||||
static void popup(lv_obj_t* overlay, lv_opa_t dim = LV_OPA_60, lv_anim_completed_cb_t done = nullptr) {
|
||||
run(overlay, setBgOpa, LV_OPA_TRANSP, dim, POP_MS, done);
|
||||
lv_obj_t* panel = lv_obj_get_child(overlay, 0);
|
||||
if (panel) rise(panel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user