Don't reload background contrast effect on screen resize
ClosedPublic

Authored by davidedmundson on Sep 22 2017, 1:14 PM.

Details

Summary

Similar to the Blur patch. Arguably rven less reason as this doesn't
have a texture the size of the workspace.

We don't need to delete and recreate the entire effect every time the
screen changes; This deletes the wayland global which causes quite a bit
of extra work for the clients.

Test Plan

Changed resolution under X, and scale under wayland
Panel looked the same and nothing exploded

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.
davidedmundson created this revision.Sep 22 2017, 1:14 PM
Restricted Application added a project: KWin. · View Herald TranscriptSep 22 2017, 1:14 PM
Restricted Application added subscribers: KWin, kwin, plasma-devel. · View Herald Transcript
graesslin added inline comments.
effects/backgroundcontrast/contrast.cpp
87

please no foreach in new code, please use range-based for. (Reason: I don't trust Qt to keep it after there was a prominent blog post about deprecating foreach)

87–88

Please use {}

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptSep 22 2017, 2:27 PM
graesslin accepted this revision.Sep 22 2017, 2:55 PM
This revision is now accepted and ready to land.Sep 22 2017, 2:55 PM
This revision was automatically updated to reflect the committed changes.