effects: Disable blur and contrast effect when screen is locked
The results of the blur and the background contrast effect will never be seen if the screen locker is active. In order to avoid wasting computational resources, we could temporarily disable the blur effect until the screen is unlocked. Furthermore, given that the blur effect shrinks the clip region, it is guaranteed that the compositor will have to render the desktop window behind the lockscreen window. With this change, all windows behind the screen locker will be properly clipped away.master
parent
87ff6e4b44
commit
ed113171f3
|
@ -511,5 +511,10 @@ void ContrastEffect::doContrast(EffectWindow *w, const QRegion& shape, const QRe
|
|||
shader->unbind();
|
||||
}
|
||||
|
||||
bool ContrastEffect::isActive() const
|
||||
{
|
||||
return !effects->isScreenLocked();
|
||||
}
|
||||
|
||||
} // namespace KWin
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
void paintEffectFrame(EffectFrame *frame, const QRegion ®ion, double opacity, double frameOpacity) override;
|
||||
|
||||
bool provides(Feature feature) override;
|
||||
bool isActive() const override;
|
||||
|
||||
int requestedEffectChainPosition() const override {
|
||||
return 76;
|
||||
|
|
|
@ -809,5 +809,10 @@ void BlurEffect::copyScreenSampleTexture(GLVertexBuffer *vbo, int blurRectCount,
|
|||
m_shader->unbind();
|
||||
}
|
||||
|
||||
bool BlurEffect::isActive() const
|
||||
{
|
||||
return !effects->isScreenLocked();
|
||||
}
|
||||
|
||||
} // namespace KWin
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
void paintEffectFrame(EffectFrame *frame, const QRegion ®ion, double opacity, double frameOpacity) override;
|
||||
|
||||
bool provides(Feature feature) override;
|
||||
bool isActive() const override;
|
||||
|
||||
int requestedEffectChainPosition() const override {
|
||||
return 75;
|
||||
|
|
Loading…
Reference in New Issue