D23514: [platforms/x11] Never block on retrace, always present after paint

Roman Gilg noreply at phabricator.kde.org
Tue Aug 27 22:41:48 BST 2019


romangg created this revision.
romangg added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
romangg requested review of this revision.

REVISION SUMMARY
  Compositing in X11 was done time shifted, meaning that we paint first, then
  wait one vblank interval length and present on prepareRenderingFrame the
  previous paint result. This is supposed to make sure we don't miss the vblank
  and in case of block till retrace be able to continue issuing commands and
  only shortly before next vblank present.
  
  This is counter-intuitiv, not how we do it on Wayland or even on MESA with X.
  The reason seems to be that the GLX backend was in the beginning written
  against Nvidia proprietary driver which needed this but nowadays even this
  driver defaults to non-blocking behavior on buffer swap.
  
  Therefore remove this legacy anomaly fully and directly present after paint.
  We then wait one refresh cycle and in the future can optimize this by delaying
  the paint and present till shortly before vsync.

TEST PLAN
  kwin_x11 tested on i915.

REPOSITORY
  R108 KWin

BRANCH
  mvPresent

REVISION DETAIL
  https://phabricator.kde.org/D23514

AFFECTED FILES
  composite.cpp
  platformsupport/scenes/opengl/backend.cpp
  platformsupport/scenes/opengl/backend.h
  plugins/platforms/x11/common/eglonxbackend.cpp
  plugins/platforms/x11/standalone/glxbackend.cpp
  plugins/scenes/opengl/scene_opengl.cpp
  plugins/scenes/opengl/scene_opengl.h
  scene.cpp
  scene.h
  workspace.cpp

To: romangg, #kwin
Cc: kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190827/3544f68f/attachment.html>


More information about the kwin mailing list