Changeset View
Changeset View
Standalone View
Standalone View
effects/backgroundcontrast/contrast.h
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include <kwineffects.h> | 24 | #include <kwineffects.h> | ||
25 | #include <kwinglplatform.h> | 25 | #include <kwinglplatform.h> | ||
26 | #include <kwinglutils.h> | 26 | #include <kwinglutils.h> | ||
27 | 27 | | |||
28 | #include <QVector> | 28 | #include <QVector> | ||
29 | #include <QVector2D> | 29 | #include <QVector2D> | ||
30 | 30 | | |||
31 | namespace KWayland | 31 | namespace KWaylandServer | ||
32 | { | | |||
33 | namespace Server | | |||
34 | { | 32 | { | ||
35 | class ContrastManagerInterface; | 33 | class ContrastManagerInterface; | ||
36 | } | 34 | } | ||
37 | } | | |||
38 | 35 | | |||
39 | namespace KWin | 36 | namespace KWin | ||
40 | { | 37 | { | ||
41 | 38 | | |||
42 | class ContrastShader; | 39 | class ContrastShader; | ||
43 | 40 | | |||
44 | class ContrastEffect : public KWin::Effect | 41 | class ContrastEffect : public KWin::Effect | ||
45 | { | 42 | { | ||
Show All 36 Lines | |||||
82 | 79 | | |||
83 | private: | 80 | private: | ||
84 | ContrastShader *shader; | 81 | ContrastShader *shader; | ||
85 | long net_wm_contrast_region; | 82 | long net_wm_contrast_region; | ||
86 | QRegion m_paintedArea; // actually painted area which is greater than m_damagedArea | 83 | QRegion m_paintedArea; // actually painted area which is greater than m_damagedArea | ||
87 | QRegion m_currentContrast; // keeps track of the currently contrasted area of non-caching windows(from bottom to top) | 84 | QRegion m_currentContrast; // keeps track of the currently contrasted area of non-caching windows(from bottom to top) | ||
88 | QHash< const EffectWindow*, QMatrix4x4> m_colorMatrices; | 85 | QHash< const EffectWindow*, QMatrix4x4> m_colorMatrices; | ||
89 | QHash< const EffectWindow*, QMetaObject::Connection > m_contrastChangedConnections; // used only in Wayland to keep track of effect changed | 86 | QHash< const EffectWindow*, QMetaObject::Connection > m_contrastChangedConnections; // used only in Wayland to keep track of effect changed | ||
90 | KWayland::Server::ContrastManagerInterface *m_contrastManager = nullptr; | 87 | KWaylandServer::ContrastManagerInterface *m_contrastManager = nullptr; | ||
91 | }; | 88 | }; | ||
92 | 89 | | |||
93 | inline | 90 | inline | ||
94 | bool ContrastEffect::provides(Effect::Feature feature) | 91 | bool ContrastEffect::provides(Effect::Feature feature) | ||
95 | { | 92 | { | ||
96 | if (feature == Contrast) { | 93 | if (feature == Contrast) { | ||
97 | return true; | 94 | return true; | ||
98 | } | 95 | } | ||
99 | return KWin::Effect::provides(feature); | 96 | return KWin::Effect::provides(feature); | ||
100 | } | 97 | } | ||
101 | 98 | | |||
102 | 99 | | |||
103 | } // namespace KWin | 100 | } // namespace KWin | ||
104 | 101 | | |||
105 | #endif | 102 | #endif | ||
106 | 103 | |