Skip to content

Fix fps display

Benjamin Otte requested to merge wip/otte/correct-fps into main

I wanted to fix the inspector fps display to not glitch when fps is >10,000 so I could see the correct fps when rendering without full-redraw, because people were making fun of GTK for taking too much CPU for rotating a spinner.

It turns out our timings history wasn't large enough to hold a large enough timespan to accurately report such high fps.
So I made the timings history dynamic to hold 1s of backlog.

After I did that it turned out we were keeping a different number of timings than the fps the inspector was reporting. It turns out the fps reporting was a bit in accurate. So I fixed that, too.

Anyway, we should now accurately report fps when not doing full redraw. And that means I can now display the correct fps I get with no-vsync when widget-factory just spins a spinner (2 spinners actually, and a progress bar!) on my laptop:

image

I think this is correct? @matthiasc @chergert ?

Merge request reports