[client] overlay: coalesce pointer redraws during splash fade

Pointer updates bypassed the paced overlay render and woke the renderer
for every cursor packet. On the default single-buffer EGL surface,
each full fade redraw could expose the desktop before the splash was
blended again.

Coalesce pointer redraws into the existing fade cadence while keeping
the latest cursor state. Immediate cursor redraw resumes when the fade
ends.
This commit is contained in:
Geoffrey McRae
2026-08-06 18:17:34 +10:00
parent d8604ec144
commit 604b3082f3
3 changed files with 19 additions and 2 deletions

View File

@@ -916,7 +916,9 @@ int main_cursorThread(void * unused)
(g_cursor.draw || !g_params.useSpiceInput),
g_cursor.guest.x, g_cursor.guest.y,
g_cursor.guest.hx, g_cursor.guest.hy);
if (!g_state.stopVideo)
/* The active fade already schedules a render. Coalesce pointer
* changes into it instead of exposing rapid single-buffer redraws. */
if (!g_state.stopVideo && !overlaySplash_isFading())
lgSignalEvent(g_state.frameEvent);
}
continue;
@@ -990,7 +992,8 @@ int main_cursorThread(void * unused)
if ((g_params.mouseRedraw ||
(pointer.flags & LG_TRANSPORT_POINTER_COLOR_TRANSFORM)) &&
g_cursor.guest.visible && !g_state.stopVideo)
g_cursor.guest.visible && !g_state.stopVideo &&
!overlaySplash_isFading())
lgSignalEvent(g_state.frameEvent);
g_state.transportOps->releasePointer(g_state.transport, &pointer);