KWin
Loading...
Searching...
No Matches
showpaint.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2007 Lubos Lunak <l.lunak@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "effect/effect.h"
13
14namespace KWin
15{
16
17class ShowPaintEffect : public Effect
18{
19 Q_OBJECT
20
21public:
23
24 void paintScreen(const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, Output *screen) override;
25 void paintWindow(const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override;
26
27 bool isActive() const override;
28
29private Q_SLOTS:
30 void toggle();
31
32private:
33 void paintGL(const QMatrix4x4 &projection, qreal scale);
34 void paintQPainter();
35
36 bool m_active = false;
37 QRegion m_painted; // what's painted in one pass
38 int m_colorIndex = 0;
39};
40
41} // namespace KWin
Base class for all KWin effects.
Definition effect.h:535
Representation of a window used by/for Effect classes.
bool isActive() const override
void paintWindow(const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override
Definition showpaint.cpp:62
void paintScreen(const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, Output *screen) override
Definition showpaint.cpp:48