[client] overlay: restore every splash fade frame

Mark the active fade as requiring a fully restored render target.
This also covers guest-driven renders between animation ticks so they
cannot blend over stale splash content.
This commit is contained in:
Geoffrey McRae
2026-08-05 10:53:52 +10:00
parent 606a06535e
commit d815ef87d5
5 changed files with 40 additions and 6 deletions

View File

@@ -1030,6 +1030,27 @@ bool app_overlayNeedsRender(void)
return result;
}
bool app_overlayNeedsFullRender(void)
{
bool result = false;
struct Overlay * overlay;
ll_lock(g_state.overlays);
ll_forEachNL(g_state.overlays, item, overlay)
{
if (!overlay->ops->needs_full_render)
continue;
if (overlay->ops->needs_full_render(overlay->udata))
{
result = true;
break;
}
}
ll_unlock(g_state.overlays);
return result;
}
int app_renderOverlay(struct Rect * rects, int maxRects)
{
int totalRects = 0;

View File

@@ -695,7 +695,9 @@ static int renderThread(void * unused)
atomic_compare_exchange_weak(&g_state.lgrResize, &resize, 0);
}
const bool invalidate = atomic_exchange(&g_state.invalidateWindow, false);
const bool invalidate =
atomic_exchange(&g_state.invalidateWindow, false) ||
app_overlayNeedsFullRender();
const LG_RendererFrameToken frameTokenLimit = frameTimingQueuedToken();
const uint64_t prepareStart = nanotime();

View File

@@ -247,13 +247,19 @@ static bool splash_tick(void * udata, unsigned long long tickCount)
return false;
}
static bool splash_needsFullRender(void * udata)
{
return !l_show && !l_fadeDone;
}
struct LG_OverlayOps LGOverlaySplash =
{
.name = "splash",
.init = splash_init,
.free = splash_free,
.render = splash_render,
.tick = splash_tick,
.name = "splash",
.init = splash_init,
.free = splash_free,
.needs_full_render = splash_needsFullRender,
.render = splash_render,
.tick = splash_tick,
};
void overlaySplash_show(bool show)