239280f855
With server-side buffer allocation, buffers may be returned out of order (e.g. they may be held onto by external references or hardware). As such we may see older buffers the frame after we discard the history from seeing a very young buffer. To overcome this we want to keep the history in a ring so we can keep track of older entries without keeping an unbounded list. After converting to a ring, the maximum buffer age observed during testing was 5 (expected value of 4), but before we could see ages as high as 9 due to the huge latency spikes caused by doing full buffer redraws (compounded by external listeners doing readback on the damaged areas, for example vnc, drm/udl, prime). For this reason, a maximum age of 16 was chosen to be suitably large enough to prevent these worst cases from taxing the system. v2: Fix off-by-one in combining the damage histroy into the clipping rectangle, and apply copious whitespace fixes. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=745512 References: https://bugzilla.gnome.org/show_bug.cgi?id=724788 References: https://bugzilla.gnome.org/show_bug.cgi?id=669122 |
||
---|---|---|
.. | ||
clutter-stage-cogl.c | ||
clutter-stage-cogl.h |