2
* Copyright © 2010 Fredrik Höglund <fredrik@kde.org>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; see the file COPYING. if not, write to
16
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
* Boston, MA 02110-1301, USA.
23
#include <kwineffects.h>
24
#include <kwinglplatform.h>
25
#include <kwinglutils.h>
35
class BlurEffect : public KWin::Effect
42
static bool supported();
43
static bool enabledByDefault();
45
void reconfigure(ReconfigureFlags flags);
46
void prePaintScreen(ScreenPrePaintData &data, int time);
47
void drawWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
48
void paintEffectFrame(EffectFrame *frame, QRegion region, double opacity, double frameOpacity);
51
void slotWindowAdded(EffectWindow *w);
52
void slotPropertyNotify(EffectWindow *w, long atom);
55
QRect expand(const QRect &rect) const;
56
QRegion expand(const QRegion ®ion) const;
57
QRegion blurRegion(const EffectWindow *w) const;
58
bool shouldBlur(const EffectWindow *w, int mask, const WindowPaintData &data) const;
59
void updateBlurRegion(EffectWindow *w) const;
60
void drawRegion(const QRegion ®ion);
61
void doBlur(const QRegion &shape, const QRect &screen, const float opacity);
65
QVector<QVector2D> vertices;
66
GLRenderTarget *target;
68
long net_wm_blur_region;