[client] metrics: correlate Wayland presentation timing

This commit is contained in:
Geoffrey McRae
2026-08-06 17:29:44 +10:00
parent d3ee46f376
commit ea6e155bbf
11 changed files with 327 additions and 63 deletions

View File

@@ -1661,13 +1661,20 @@ static EGLNativeWindowType x11GetEGLNativeWindow(void)
}
static bool x11EGLSwapBuffers(EGLDisplay display, EGLSurface surface,
const struct Rect * damage, int count)
const struct Rect * damage, int count, uint64_t frameToken,
uint64_t * swapTime, bool * presentTracked)
{
static struct SwapWithDamageData data = {0};
if (!data.init)
swapWithDamageInit(&data, display);
return swapWithDamage(&data, display, surface, damage, count);
(void)frameToken;
*presentTracked = false;
const uint64_t start = nanotime();
const bool result =
swapWithDamage(&data, display, surface, damage, count);
*swapTime = nanotime() - start;
return result;
}
#endif