diff options
author | Dudemanguy <random342@airmail.cc> | 2020-10-13 10:36:08 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2020-10-15 13:36:49 +0000 |
commit | deaea70630647e261d60fa7eb9447d386efd38d2 (patch) | |
tree | 63fce14dd26307b562530b2a6a3bb576da84b03b /video/out/opengl/angle_dynamic.h | |
parent | cfead22b803e67bbd9d8ac09d61a56148938d46b (diff) | |
download | mpv-deaea70630647e261d60fa7eb9447d386efd38d2.tar.bz2 mpv-deaea70630647e261d60fa7eb9447d386efd38d2.tar.xz |
wayland: be less strict about when to render
efb0c5c changed the rendering logic of mpv on wayland and made it skip
rendering when it did not receive frame callback in time. The idea was
to skip rendering when the surface was hidden and be less wasteful. This
unfortunately had issues in certain instances where a frame callback
could be missed (but the window was still in view) due to imprecise
rendering (like the default audio video-sync mode). This would lead to
the video appearing to stutter since mpv would skip rendering in those
cases.
To account for this case, simply re-add an old heuristic for detecting
if a window is hidden or not since the goal is to simply not render when
a window is hidden. If the wait on the frame callback times out enough
times in a row, then we consider the window hidden and thus begin to
skip rendering then. The actual threshold to consider a surface as
hidden is completely arbitrary (greater than your monitor's refresh
rate), but it's safe enough since realistically you're not going to miss
60+ frame callbacks in a row unless the surface actually is hidden.
Fixes #8169.
Diffstat (limited to 'video/out/opengl/angle_dynamic.h')
0 files changed, 0 insertions, 0 deletions