Avoid fullRepaint loop penalty in paintSimpleScreen
ClosedPublic

Authored by jacopods on Apr 14 2020, 2:44 AM.

Details

Reviewers
kwin
broulik
zzag
Group Reviewers
KWin
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.

Diff Detail

Repository
R108 KWin
Lint
Lint Skipped
Unit
Unit Tests Skipped
jacopods requested review of this revision.Apr 14 2020, 2:44 AM
jacopods created this revision.
anthonyfieroni added a subscriber: anthonyfieroni.

Create patch like this git diff -U999 > 1.patch it will add more context to be shown to reviewers.

zzag accepted this revision.Apr 14 2020, 10:26 AM

Thanks, makes sense.

This revision is now accepted and ready to land.Apr 14 2020, 10:26 AM

Great. It has been a while since I pushed my last patch. I just pushed to master from my branch, but probably I should have done something else to acknowledge the review… Sorry about this

davidedmundson added a subscriber: davidedmundson.

When you upload with arc it inserts a line into the commit message with an ID. That then will automaigcally close the reviews.