Commit e144748c authored by Albert Astals Cid's avatar Albert Astals Cid

Add some const &

Summary:
Won't make things go much faster since everything that was
being passed by value is refcounted but still const & is a bit faster
than refcounting

For shared pointers instead of adding const & we move them into the
destination variable saving some cpu usage but at the same time making
clear the pointer is being stored by not being const &

Reviewers: zzag

Reviewed By: zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25022
parent 92197242
......@@ -124,7 +124,7 @@ public:
return 0;
}
void doneOpenGLContextCurrent() override {}
void drawWindow(KWin::EffectWindow *, int, QRegion, KWin::WindowPaintData &) override {}
void drawWindow(KWin::EffectWindow *, int, const QRegion &, KWin::WindowPaintData &) override {}
KWin::EffectFrame *effectFrame(KWin::EffectFrameStyle, bool, const QPoint &, Qt::Alignment) const override {
return nullptr;
}
......@@ -173,9 +173,9 @@ public:
bool optionRollOverDesktops() const override {
return false;
}
void paintEffectFrame(KWin::EffectFrame *, QRegion, double, double) override {}
void paintScreen(int, QRegion, KWin::ScreenPaintData &) override {}
void paintWindow(KWin::EffectWindow *, int, QRegion, KWin::WindowPaintData &) override {}
void paintEffectFrame(KWin::EffectFrame *, const QRegion &, double, double) override {}
void paintScreen(int, const QRegion &, KWin::ScreenPaintData &) override {}
void paintWindow(KWin::EffectWindow *, int, const QRegion &, KWin::WindowPaintData &) override {}
void postPaintScreen() override {}
void postPaintWindow(KWin::EffectWindow *) override {}
void prePaintScreen(KWin::ScreenPrePaintData &, int) override {}
......
......@@ -397,7 +397,7 @@ void EffectsHandlerImpl::prePaintScreen(ScreenPrePaintData& data, int time)
// no special final code
}
void EffectsHandlerImpl::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void EffectsHandlerImpl::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
if (m_currentPaintScreenIterator != m_activeEffects.constEnd()) {
(*m_currentPaintScreenIterator++)->paintScreen(mask, region, data);
......@@ -440,7 +440,7 @@ void EffectsHandlerImpl::prePaintWindow(EffectWindow* w, WindowPrePaintData& dat
// no special final code
}
void EffectsHandlerImpl::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
void EffectsHandlerImpl::paintWindow(EffectWindow* w, int mask, const QRegion &region, WindowPaintData& data)
{
if (m_currentPaintWindowIterator != m_activeEffects.constEnd()) {
(*m_currentPaintWindowIterator++)->paintWindow(w, mask, region, data);
......@@ -449,7 +449,7 @@ void EffectsHandlerImpl::paintWindow(EffectWindow* w, int mask, QRegion region,
m_scene->finalPaintWindow(static_cast<EffectWindowImpl*>(w), mask, region, data);
}
void EffectsHandlerImpl::paintEffectFrame(EffectFrame* frame, QRegion region, double opacity, double frameOpacity)
void EffectsHandlerImpl::paintEffectFrame(EffectFrame* frame, const QRegion &region, double opacity, double frameOpacity)
{
if (m_currentPaintEffectFrameIterator != m_activeEffects.constEnd()) {
(*m_currentPaintEffectFrameIterator++)->paintEffectFrame(frame, region, opacity, frameOpacity);
......@@ -477,7 +477,7 @@ Effect *EffectsHandlerImpl::provides(Effect::Feature ef)
return nullptr;
}
void EffectsHandlerImpl::drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
void EffectsHandlerImpl::drawWindow(EffectWindow* w, int mask, const QRegion &region, WindowPaintData& data)
{
if (m_currentDrawWindowIterator != m_activeEffects.constEnd()) {
(*m_currentDrawWindowIterator++)->drawWindow(w, mask, region, data);
......@@ -2280,7 +2280,7 @@ void EffectFrameImpl::plasmaThemeChanged()
free();
}
void EffectFrameImpl::render(QRegion region, double opacity, double frameOpacity)
void EffectFrameImpl::render(const QRegion &region, double opacity, double frameOpacity)
{
if (m_geometry.isEmpty()) {
return; // Nothing to display
......
......@@ -74,20 +74,20 @@ public:
EffectsHandlerImpl(Compositor *compositor, Scene *scene);
~EffectsHandlerImpl() override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
/**
* Special hook to perform a paintScreen but just with the windows on @p desktop.
*/
void paintDesktop(int desktop, int mask, QRegion region, ScreenPaintData& data);
void postPaintScreen() override;
void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override;
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
void paintWindow(EffectWindow* w, int mask, const QRegion &region, WindowPaintData& data) override;
void postPaintWindow(EffectWindow* w) override;
void paintEffectFrame(EffectFrame* frame, QRegion region, double opacity, double frameOpacity) override;
void paintEffectFrame(EffectFrame* frame, const QRegion &region, double opacity, double frameOpacity) override;
Effect *provides(Effect::Feature ef);
void drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
void drawWindow(EffectWindow* w, int mask, const QRegion &region, WindowPaintData& data) override;
void buildQuads(EffectWindow* w, WindowQuadList& quadList) override;
......@@ -541,7 +541,7 @@ public:
~EffectFrameImpl() override;
void free() override;
void render(QRegion region = infiniteRegion(), double opacity = 1.0, double frameOpacity = 1.0) override;
void render(const QRegion &region = infiniteRegion(), double opacity = 1.0, double frameOpacity = 1.0) override;
Qt::Alignment alignment() const override;
void setAlignment(Qt::Alignment alignment) override;
const QFont& font() const override;
......
......@@ -431,7 +431,7 @@ bool ContrastEffect::shouldContrast(const EffectWindow *w, int mask, const Windo
return true;
}
void ContrastEffect::drawWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
void ContrastEffect::drawWindow(EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data)
{
const QRect screen = GLRenderTarget::virtualScreenGeometry();
if (shouldContrast(w, mask, data)) {
......@@ -467,7 +467,7 @@ void ContrastEffect::drawWindow(EffectWindow *w, int mask, QRegion region, Windo
effects->drawWindow(w, mask, region, data);
}
void ContrastEffect::paintEffectFrame(EffectFrame *frame, QRegion region, double opacity, double frameOpacity)
void ContrastEffect::paintEffectFrame(EffectFrame *frame, const QRegion &region, double opacity, double frameOpacity)
{
//FIXME: this is a no-op for now, it should figure out the right contrast, intensity, saturation
effects->paintEffectFrame(frame, region, opacity, frameOpacity);
......
......@@ -55,8 +55,8 @@ public:
void reconfigure(ReconfigureFlags flags) override;
void prePaintScreen(ScreenPrePaintData &data, int time) override;
void prePaintWindow(EffectWindow *w, WindowPrePaintData &data, int time) override;
void drawWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override;
void paintEffectFrame(EffectFrame *frame, QRegion region, double opacity, double frameOpacity) override;
void drawWindow(EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data) override;
void paintEffectFrame(EffectFrame *frame, const QRegion &region, double opacity, double frameOpacity) override;
bool provides(Feature feature) override;
......
......@@ -580,7 +580,7 @@ bool BlurEffect::shouldBlur(const EffectWindow *w, int mask, const WindowPaintDa
return true;
}
void BlurEffect::drawWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
void BlurEffect::drawWindow(EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data)
{
const QRect screen = GLRenderTarget::virtualScreenGeometry();
if (shouldBlur(w, mask, data)) {
......@@ -616,7 +616,7 @@ void BlurEffect::drawWindow(EffectWindow *w, int mask, QRegion region, WindowPai
effects->drawWindow(w, mask, region, data);
}
void BlurEffect::paintEffectFrame(EffectFrame *frame, QRegion region, double opacity, double frameOpacity)
void BlurEffect::paintEffectFrame(EffectFrame *frame, const QRegion &region, double opacity, double frameOpacity)
{
const QRect screen = effects->virtualScreenGeometry();
bool valid = m_renderTargetsValid && m_shader && m_shader->isValid();
......
......@@ -58,8 +58,8 @@ public:
void reconfigure(ReconfigureFlags flags) override;
void prePaintScreen(ScreenPrePaintData &data, int time) override;
void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override;
void drawWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override;
void paintEffectFrame(EffectFrame *frame, QRegion region, double opacity, double frameOpacity) override;
void drawWindow(EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data) override;
void paintEffectFrame(EffectFrame *frame, const QRegion &region, double opacity, double frameOpacity) override;
bool provides(Feature feature) override;
......
......@@ -61,7 +61,7 @@ ColorPickerEffect::ColorPickerEffect()
ColorPickerEffect::~ColorPickerEffect() = default;
void ColorPickerEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
void ColorPickerEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
m_cachedOutputGeometry = data.outputGeometry();
effects->paintScreen(mask, region, data);
......
......@@ -37,7 +37,7 @@ class ColorPickerEffect : public Effect, protected QDBusContext
public:
ColorPickerEffect();
~ColorPickerEffect() override;
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
void postPaintScreen() override;
bool isActive() const override;
......
......@@ -129,7 +129,7 @@ void CoverSwitchEffect::prePaintScreen(ScreenPrePaintData& data, int time)
effects->prePaintScreen(data, time);
}
void CoverSwitchEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void CoverSwitchEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
effects->paintScreen(mask, region, data);
......
......@@ -54,7 +54,7 @@ public:
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData &data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
void postPaintScreen() override;
void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override;
void windowInputMouseEvent(QEvent *e) override;
......
......@@ -397,7 +397,7 @@ void CubeEffect::prePaintScreen(ScreenPrePaintData& data, int time)
effects->prePaintScreen(data, time);
}
void CubeEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void CubeEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
if (activated) {
QRect rect = effects->clientArea(FullArea, activeScreen, effects->currentDesktop());
......
......@@ -59,7 +59,7 @@ public:
~CubeEffect() override;
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void postPaintScreen() override;
void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override;
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
......
......@@ -87,7 +87,7 @@ void CubeSlideEffect::prePaintScreen(ScreenPrePaintData& data, int time)
effects->prePaintScreen(data, time);
}
void CubeSlideEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void CubeSlideEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
if (isActive()) {
glEnable(GL_CULL_FACE);
......
......@@ -43,7 +43,7 @@ public:
~CubeSlideEffect() override;
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void postPaintScreen() override;
void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override;
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
......
......@@ -181,7 +181,7 @@ void DesktopGridEffect::prePaintScreen(ScreenPrePaintData& data, int time)
effects->prePaintScreen(data, time);
}
void DesktopGridEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void DesktopGridEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
if (timeline.currentValue() == 0 && !isUsingPresentWindows()) {
effects->paintScreen(mask, region, data);
......
......@@ -70,7 +70,7 @@ public:
~DesktopGridEffect() override;
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void postPaintScreen() override;
void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override;
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
......
......@@ -120,7 +120,7 @@ void FlipSwitchEffect::prePaintScreen(ScreenPrePaintData& data, int time)
effects->prePaintScreen(data, time);
}
void FlipSwitchEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void FlipSwitchEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
effects->paintScreen(mask, region, data);
if (m_active) {
......
......@@ -47,7 +47,7 @@ public:
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void postPaintScreen() override;
void prePaintWindow(EffectWindow *w, WindowPrePaintData &data, int time) override;
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
......
......@@ -82,7 +82,7 @@ bool InvertEffect::loadData()
return true;
}
void InvertEffect::drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
void InvertEffect::drawWindow(EffectWindow* w, int mask, const QRegion &region, WindowPaintData& data)
{
// Load if we haven't already
if (m_valid && !m_inited)
......@@ -103,7 +103,7 @@ void InvertEffect::drawWindow(EffectWindow* w, int mask, QRegion region, WindowP
}
}
void InvertEffect::paintEffectFrame(KWin::EffectFrame* frame, QRegion region, double opacity, double frameOpacity)
void InvertEffect::paintEffectFrame(KWin::EffectFrame* frame, const QRegion &region, double opacity, double frameOpacity)
{
if (m_valid && m_allWindows) {
frame->setShader(m_shader);
......
......@@ -40,8 +40,8 @@ public:
InvertEffect();
~InvertEffect() override;
void drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
void paintEffectFrame(KWin::EffectFrame* frame, QRegion region, double opacity, double frameOpacity) override;
void drawWindow(EffectWindow* w, int mask, const QRegion &region, WindowPaintData& data) override;
void paintEffectFrame(KWin::EffectFrame* frame, const QRegion &region, double opacity, double frameOpacity) override;
bool isActive() const override;
bool provides(Feature) override;
......
......@@ -225,7 +225,7 @@ void LookingGlassEffect::slotMouseChanged(const QPoint& pos, const QPoint& old,
}
}
void LookingGlassEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
void LookingGlassEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
// Call the next effect.
effects->paintScreen(mask, region, data);
......
......@@ -46,7 +46,7 @@ public:
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
bool isActive() const override;
static bool supported();
......
......@@ -138,7 +138,7 @@ void MagnifierEffect::prePaintScreen(ScreenPrePaintData& data, int time)
data.paint |= magnifierArea().adjusted(-FRAME_WIDTH, -FRAME_WIDTH, FRAME_WIDTH, FRAME_WIDTH);
}
void MagnifierEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void MagnifierEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
effects->paintScreen(mask, region, data); // paint normal screen
if (zoom != 1.0) {
......
......@@ -42,7 +42,7 @@ public:
~MagnifierEffect() override;
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void postPaintScreen() override;
bool isActive() const override;
static bool supported();
......
......@@ -111,7 +111,7 @@ void MouseClickEffect::prePaintScreen(ScreenPrePaintData& data, int time)
effects->prePaintScreen(data, time);
}
void MouseClickEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void MouseClickEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
effects->paintScreen(mask, region, data);
......
......@@ -104,7 +104,7 @@ public:
~MouseClickEffect() override;
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void postPaintScreen() override;
bool isActive() const override;
......
......@@ -111,7 +111,7 @@ void MouseMarkEffect::addRect(const QPoint &p1, const QPoint &p2, xcb_rectangle_
}
#endif
void MouseMarkEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void MouseMarkEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
effects->paintScreen(mask, region, data); // paint normal screen
if (marks.isEmpty() && drawing.isEmpty())
......
......@@ -40,7 +40,7 @@ public:
MouseMarkEffect();
~MouseMarkEffect() override;
void reconfigure(ReconfigureFlags) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
bool isActive() const override;
// for properties
......
......@@ -218,7 +218,7 @@ void PresentWindowsEffect::prePaintScreen(ScreenPrePaintData &data, int time)
effects->prePaintScreen(data, time);
}
void PresentWindowsEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
void PresentWindowsEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
effects->paintScreen(mask, region, data);
......
......@@ -98,7 +98,7 @@ public:
// Screen painting
void prePaintScreen(ScreenPrePaintData &data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
void postPaintScreen() override;
// Window painting
......
......@@ -89,7 +89,7 @@ void ScreenEdgeEffect::prePaintScreen(ScreenPrePaintData &data, int time)
}
}
void ScreenEdgeEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
void ScreenEdgeEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
effects->paintScreen(mask, region, data);
for (QHash<ElectricBorder, Glow*>::iterator it = m_borders.begin();
......
......@@ -37,7 +37,7 @@ public:
ScreenEdgeEffect();
~ScreenEdgeEffect() override;
void prePaintScreen(ScreenPrePaintData &data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
bool isActive() const override;
int requestedEffectChainPosition() const override {
......
......@@ -156,7 +156,7 @@ static xcb_pixmap_t xpixmapFromImage(const QImage &image)
return pixmap;
}
void ScreenShotEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
void ScreenShotEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
m_cachedOutputGeometry = data.outputGeometry();
effects->paintScreen(mask, region, data);
......
......@@ -44,7 +44,7 @@ public:
ScreenShotEffect();
~ScreenShotEffect() override;
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
void postPaintScreen() override;
bool isActive() const override;
......
......@@ -151,7 +151,7 @@ void ShowFpsEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Windo
paint_size[ paints_pos ] += winsize;
}
void ShowFpsEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void ShowFpsEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
effects->paintScreen(mask, region, data);
int fps = 0;
......
......@@ -46,7 +46,7 @@ public:
ShowFpsEffect();
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
void postPaintScreen() override;
enum { INSIDE_GRAPH, NOWHERE, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT }; // fps text position
......
......@@ -58,7 +58,7 @@ ShowPaintEffect::ShowPaintEffect()
connect(toggleAction, &QAction::triggered, this, &ShowPaintEffect::toggle);
}
void ShowPaintEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
void ShowPaintEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
m_painted = QRegion();
effects->paintScreen(mask, region, data);
......
......@@ -33,7 +33,7 @@ class ShowPaintEffect : public Effect
public:
ShowPaintEffect();
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override;
bool isActive() const override;
......
......@@ -128,7 +128,7 @@ inline QRegion buildClipRegion(const QPoint &pos, int w, int h)
return r;
}
void SlideEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
void SlideEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
const bool wrap = effects->optionRollOverDesktops();
const int w = workspaceWidth();
......
......@@ -45,7 +45,7 @@ public:
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData &data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
void postPaintScreen() override;
void prePaintWindow(EffectWindow *w, WindowPrePaintData &data, int time) override;
......
......@@ -105,7 +105,7 @@ void SnapHelperEffect::prePaintScreen(ScreenPrePaintData &data, int time)
effects->prePaintScreen(data, time);
}
void SnapHelperEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
void SnapHelperEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
effects->paintScreen(mask, region, data);
......
......@@ -38,7 +38,7 @@ public:
void reconfigure(ReconfigureFlags flags) override;
void prePaintScreen(ScreenPrePaintData &data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData &data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData &data) override;
void postPaintScreen() override;
bool isActive() const override;
......
......@@ -169,7 +169,7 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, int time)
effects->prePaintScreen(data, time);
}
void StartupFeedbackEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void StartupFeedbackEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
effects->paintScreen(mask, region, data);
if (m_active) {
......
......@@ -40,7 +40,7 @@ public:
void reconfigure(ReconfigureFlags flags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void postPaintScreen() override;
bool isActive() const override;
......
......@@ -60,7 +60,7 @@ void ThumbnailAsideEffect::reconfigure(ReconfigureFlags)
arrange();
}
void ThumbnailAsideEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
void ThumbnailAsideEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData& data)
{
painted = QRegion();
effects->paintScreen(mask, region, data);
......
......@@ -46,7 +46,7 @@ class ThumbnailAsideEffect
public:
ThumbnailAsideEffect();
void reconfigure(ReconfigureFlags) override;
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override;
// for properties
......
......@@ -127,7 +127,7 @@ void TouchPointsEffect::prePaintScreen(ScreenPrePaintData& data, int time)
effects->prePaintScreen(data, time);