Don't reload background contrast effect on screen resize
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 Reviewers: #plasma, graesslin Reviewed By: #plasma, graesslin Subscribers: graesslin, plasma-devel, kwin, #kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D7937icc-effect-5.14.5
parent
bc88f84777
commit
55d219429a
|
@ -67,9 +67,10 @@ ContrastEffect::ContrastEffect()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Fetch the contrast regions for all windows
|
// Fetch the contrast regions for all windows
|
||||||
foreach (EffectWindow *window, effects->stackingOrder())
|
for (EffectWindow *window: effects->stackingOrder()) {
|
||||||
updateContrastRegion(window);
|
updateContrastRegion(window);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ContrastEffect::~ContrastEffect()
|
ContrastEffect::~ContrastEffect()
|
||||||
{
|
{
|
||||||
|
@ -78,7 +79,14 @@ ContrastEffect::~ContrastEffect()
|
||||||
|
|
||||||
void ContrastEffect::slotScreenGeometryChanged()
|
void ContrastEffect::slotScreenGeometryChanged()
|
||||||
{
|
{
|
||||||
|
effects->makeOpenGLContextCurrent();
|
||||||
|
if (!supported()) {
|
||||||
effects->reloadEffect(this);
|
effects->reloadEffect(this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (EffectWindow *window: effects->stackingOrder()) {
|
||||||
|
updateContrastRegion(window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContrastEffect::reconfigure(ReconfigureFlags flags)
|
void ContrastEffect::reconfigure(ReconfigureFlags flags)
|
||||||
|
|
Loading…
Reference in New Issue