• Daniel Stone's avatar
    Revert "wayland: Block for the frame callback in get_back_bo not dri2_swap_buffers" · 9ca6711f
    Daniel Stone authored
    This reverts commit 25cc8890, though
    since the code has changed, it was applied manually.
    
    The intent of moving blocking from SwapBuffers to get_back_bo, was to
    avoid unnecessary triple-buffering by ensuring that the compositor had
    fully processed the previous frame before we started rendering. This
    means that the only time we would have to resort to triple-buffering
    would be when the buffer is directly scanned out, thus saving an extra
    buffer for composition anyway.
    
    The 'repaint window' changes introduced in Weston since then, however,
    have narrowed the window of time between the frame event being sent and
    the repaint loop needing to conclude, to 7ms by default, in order to
    reduce latency. This means however that blocking in get_back_bo gives a
    maximum of 7ms for the entire GL submission to begin and complete.
    
    Not only this, but if a client is using buffer_age to avoid full
    repaints, the buffer-age request will stall in get_back_bo until the
    frame callback completes, meaning that the client cannot even calculate
    the repaint area before the 7ms window.
    
    The combination of the two meant that WebKit-GTK+ was failing to
    achieve full framerate on a Minnowboard, due to spending a great deal of
    its time attempting to query the age of the next buffer before redraw.
    
    Revert to the previous behaviour of allowing rendering to begin but
    delaying SwapBuffers, unless and until we can find a more gentle
    behaviour.
    Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
    Reviewed-by: Jonas Ådahl's avatarJonas Ådahl <jadahl@gmail.com>
    Reviewed-by: default avatarDerek Foreman <derekf@osg.samsung.com>
    Tested-by: default avatarDerek Foreman <derekf@osg.samsung.com>
    Cc: Kristian Høgsberg <krh@bitplanet.net>
    9ca6711f
Name
Last commit
Last update
bin Loading commit data...
docs Loading commit data...
doxygen Loading commit data...
include Loading commit data...
m4 Loading commit data...
scons Loading commit data...
scripts Loading commit data...
src Loading commit data...
.dir-locals.el Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Android.common.mk Loading commit data...
Android.mk Loading commit data...
CleanSpec.mk Loading commit data...
Makefile.am Loading commit data...
REVIEWERS Loading commit data...
SConstruct Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
common.py Loading commit data...
configure.ac Loading commit data...
install-gallium-links.mk Loading commit data...
install-lib-links.mk Loading commit data...