<table><tr><td style="">jacopods created this revision.<br />jacopods added reviewers: KWin, kwin, broulik.<br />jacopods added a project: KWin.<br />jacopods requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D28812">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.</p>

<p>This patch sets the correct damage and prevent falling into the fullRepaint loop.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28812">https://phabricator.kde.org/D28812</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>scene.cpp</div></div></div><br /><div><strong>To: </strong>jacopods, KWin, kwin, broulik<br /><strong>Cc: </strong>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<br /></div>