kwineffects: Bring back OffscreenEffect::setShader()
OffscreenEffect can be still used to apply a shader effect to a window.
This commit is contained in:
parent
3d96b58548
commit
69859aec28
2 changed files with 13 additions and 0 deletions
|
@ -72,6 +72,13 @@ void OffscreenEffect::unredirect(EffectWindow *window)
|
|||
}
|
||||
}
|
||||
|
||||
void OffscreenEffect::setShader(EffectWindow *window, GLShader *shader)
|
||||
{
|
||||
if (const auto it = d->windows.find(window); it != d->windows.end()) {
|
||||
it->second->setShader(shader);
|
||||
}
|
||||
}
|
||||
|
||||
void OffscreenEffect::apply(EffectWindow *window, int mask, WindowPaintData &data, WindowQuadList &quads)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace KWin
|
|||
|
||||
class OffscreenEffectPrivate;
|
||||
class CrossFadeEffectPrivate;
|
||||
class ShaderEffectPrivate;
|
||||
|
||||
/**
|
||||
* The OffscreenEffect class is the base class for effects that paint deformed windows.
|
||||
|
@ -56,6 +57,11 @@ protected:
|
|||
*/
|
||||
virtual void apply(EffectWindow *window, int mask, WindowPaintData &data, WindowQuadList &quads);
|
||||
|
||||
/**
|
||||
* Allows to specify a @p shader to draw the redirected texture for @p window.
|
||||
* Can only be called once the window is redirected.
|
||||
**/
|
||||
void setShader(EffectWindow *window, GLShader *shader);
|
||||
|
||||
private Q_SLOTS:
|
||||
void handleWindowDamaged(EffectWindow *window);
|
||||
|
|
Loading…
Reference in a new issue