D28812: Avoid fullRepaint loop penalty in paintSimpleScreen

Jacopo De Simoi noreply at phabricator.kde.org
Tue Apr 14 03:44:41 BST 2020


jacopods created this revision.
jacopods added reviewers: KWin, kwin, broulik.
jacopods added a project: KWin.
jacopods requested review of this revision.

REVISION SUMMARY
  The method paintSimpleScreen is responsible for redrawing the parts of the back-buffer that need updating using the buffer_age extension.  The method fails to set correctly the damaged_region if, for some reason, one frame needs a repaint of the whole screen. In this case the backbuffer will request a full-screen repaint at some future frame, so the dirty region will be extended to full-screen. However, in this case the repaintRegion is not subtracted from the damaged_region (as it is done  for the non fullRepaints case below --see comment--) and the damaged_region is reported to be the full screen again. This causes all the subsequent frames to be reported with a full screen damage, which causes some penalty, until paintGenericScreen is invoked for some reason and then the damage gets reset correctly.
  
  This patch sets the correct damage and prevent falling into the fullRepaint loop.

REPOSITORY
  R108 KWin

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

AFFECTED FILES
  scene.cpp

To: jacopods, #kwin, kwin, broulik
Cc: Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200414/c2b6f5b3/attachment.html>


More information about the kwin mailing list