15#include <unordered_map>
20class BlurManagerInterface;
26 std::vector<std::unique_ptr<GLTexture>>
textures;
39 std::unordered_map<Output *, BlurRenderData>
render;
66 bool eventFilter(QObject *watched, QEvent *event)
override;
78 void initBlurStrengthValues();
80 QRegion decorationBlurRegion(
const EffectWindow *w)
const;
81 bool decorationSupportsBlurBehind(
const EffectWindow *w)
const;
98 std::unique_ptr<GLShader>
shader;
106 std::unique_ptr<GLShader>
shader;
116 bool m_valid =
false;
117 long net_wm_blur_region = 0;
118 QRegion m_paintedArea;
119 QRegion m_currentBlur;
120 Output *m_currentScreen =
nullptr;
122 size_t m_iterationCount;
134 QList<OffsetStruct> blurOffsets;
136 struct BlurValuesStruct
142 QList<BlurValuesStruct> blurStrengthValues;
144 QMap<EffectWindow *, QMetaObject::Connection> windowBlurChangedConnections;
145 std::unordered_map<EffectWindow *, BlurEffectData> m_windows;
147 static BlurManagerInterface *s_blurManager;
148 static QTimer *s_blurManagerRemoveTimer;
153 if (feature ==
Blur) {
int noiseTextureSizeLocation
bool provides(Feature feature) override
void drawWindow(const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, const QRegion ®ion, WindowPaintData &data) override
void reconfigure(ReconfigureFlags flags) override
int requestedEffectChainPosition() const override
bool isActive() const override
std::unique_ptr< GLTexture > noiseTexture
bool eventFilter(QObject *watched, QEvent *event) override
void slotPropertyNotify(KWin::EffectWindow *w, long atom)
void slotScreenRemoved(KWin::Output *screen)
bool blocksDirectScanout() const override
void prePaintWindow(EffectWindow *w, WindowPrePaintData &data, std::chrono::milliseconds presentTime) override
std::unique_ptr< GLShader > shader
void slotWindowDeleted(KWin::EffectWindow *w)
static bool enabledByDefault()
void setupDecorationConnections(EffectWindow *w)
void prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime) override
void slotWindowAdded(KWin::EffectWindow *w)
Base class for all KWin effects.
Representation of a window used by/for Effect classes.
virtual bool provides(Feature)
std::unordered_map< Output *, BlurRenderData > render
The render data per screen. Screens can have different color spaces.
std::optional< QRegion > content
The region that should be blurred behind the window.
std::optional< QRegion > frame
The region that should be blurred behind the frame.
std::vector< std::unique_ptr< GLTexture > > textures
std::vector< std::unique_ptr< GLFramebuffer > > framebuffers