Port Compositor::windowRepaintsPending to use std::any_of
ClosedPublic

Authored by graesslin on Nov 17 2016, 9:36 AM.

Details

Summary

While investigating a repaint issue I had a hard time to work with the
code and decided to change it to a more modern variant.

Instead of duplicating the same logic for each of the lists it's now
moved into a dedicated templated method which used std::any_of. Which is
exactly the algorithm we need: if there is any window with a non empty
repaints region it should return true.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 8255.Nov 17 2016, 9:36 AM
graesslin retitled this revision from to Port Compositor::windowRepaintsPending to use std::any_of.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin. · View Herald TranscriptNov 17 2016, 9:36 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
sebas accepted this revision.Nov 17 2016, 11:52 AM
sebas added a reviewer: sebas.
This revision is now accepted and ready to land.Nov 17 2016, 11:52 AM
This revision was automatically updated to reflect the committed changes.