Remove EffectsHandler::buildQuads()
It's currently unused and it doesn't fit the item based scene design.
This commit is contained in:
parent
a9e4d6d1f7
commit
30d0dbbaf0
7 changed files with 6 additions and 41 deletions
|
@ -40,7 +40,6 @@ public:
|
||||||
xcb_atom_t announceSupportProperty(const QByteArray &, KWin::Effect *) override {
|
xcb_atom_t announceSupportProperty(const QByteArray &, KWin::Effect *) override {
|
||||||
return XCB_ATOM_NONE;
|
return XCB_ATOM_NONE;
|
||||||
}
|
}
|
||||||
void buildQuads(KWin::EffectWindow *, KWin::WindowQuadList &) override {}
|
|
||||||
QRect clientArea(KWin::clientAreaOption, const QPoint &, int) const override {
|
QRect clientArea(KWin::clientAreaOption, const QPoint &, int) const override {
|
||||||
return QRect();
|
return QRect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ class MockEffectWindow : public EffectWindow
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MockEffectWindow(QObject *parent = nullptr);
|
MockEffectWindow(QObject *parent = nullptr);
|
||||||
WindowQuadList buildQuads(bool force = false) const override;
|
WindowQuadList buildQuads() const override;
|
||||||
QVariant data(int role) const override;
|
QVariant data(int role) const override;
|
||||||
QRect decorationInnerRect() const override;
|
QRect decorationInnerRect() const override;
|
||||||
void deleteProperty(long int atom) const override;
|
void deleteProperty(long int atom) const override;
|
||||||
|
@ -273,9 +273,8 @@ MockEffectWindow::MockEffectWindow(QObject *parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowQuadList MockEffectWindow::buildQuads(bool force) const
|
WindowQuadList MockEffectWindow::buildQuads() const
|
||||||
{
|
{
|
||||||
Q_UNUSED(force)
|
|
||||||
return WindowQuadList();
|
return WindowQuadList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,8 +133,6 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
new EffectsAdaptor(this);
|
new EffectsAdaptor(this);
|
||||||
QDBusConnection dbus = QDBusConnection::sessionBus();
|
QDBusConnection dbus = QDBusConnection::sessionBus();
|
||||||
dbus.registerObject(QStringLiteral("/Effects"), this);
|
dbus.registerObject(QStringLiteral("/Effects"), this);
|
||||||
// init is important, otherwise causes crashes when quads are build before the first painting pass start
|
|
||||||
m_currentBuildQuadsIterator = m_activeEffects.constEnd();
|
|
||||||
|
|
||||||
Workspace *ws = Workspace::self();
|
Workspace *ws = Workspace::self();
|
||||||
VirtualDesktopManager *vds = VirtualDesktopManager::self();
|
VirtualDesktopManager *vds = VirtualDesktopManager::self();
|
||||||
|
@ -477,21 +475,6 @@ void EffectsHandlerImpl::drawWindow(EffectWindow* w, int mask, const QRegion &re
|
||||||
m_scene->finalDrawWindow(static_cast<EffectWindowImpl*>(w), mask, region, data);
|
m_scene->finalDrawWindow(static_cast<EffectWindowImpl*>(w), mask, region, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::buildQuads(EffectWindow* w, WindowQuadList& quadList)
|
|
||||||
{
|
|
||||||
static bool initIterator = true;
|
|
||||||
if (initIterator) {
|
|
||||||
m_currentBuildQuadsIterator = m_activeEffects.constBegin();
|
|
||||||
initIterator = false;
|
|
||||||
}
|
|
||||||
if (m_currentBuildQuadsIterator != m_activeEffects.constEnd()) {
|
|
||||||
(*m_currentBuildQuadsIterator++)->buildQuads(w, quadList);
|
|
||||||
--m_currentBuildQuadsIterator;
|
|
||||||
}
|
|
||||||
if (m_currentBuildQuadsIterator == m_activeEffects.constBegin())
|
|
||||||
initIterator = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EffectsHandlerImpl::hasDecorationShadows() const
|
bool EffectsHandlerImpl::hasDecorationShadows() const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -2106,9 +2089,9 @@ EffectWindowList EffectWindowImpl::mainWindows() const
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowQuadList EffectWindowImpl::buildQuads(bool force) const
|
WindowQuadList EffectWindowImpl::buildQuads() const
|
||||||
{
|
{
|
||||||
return sceneWindow()->buildQuads(force);
|
return sceneWindow()->buildQuads();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectWindowImpl::setData(int role, const QVariant &data)
|
void EffectWindowImpl::setData(int role, const QVariant &data)
|
||||||
|
|
|
@ -75,8 +75,6 @@ public:
|
||||||
|
|
||||||
void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) override;
|
void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) override;
|
||||||
|
|
||||||
void buildQuads(EffectWindow* w, WindowQuadList& quadList) override;
|
|
||||||
|
|
||||||
void activateWindow(EffectWindow* c) override;
|
void activateWindow(EffectWindow* c) override;
|
||||||
EffectWindow* activeWindow() const override;
|
EffectWindow* activeWindow() const override;
|
||||||
void moveWindow(EffectWindow* w, const QPoint& pos, bool snap = false, double snapAdjust = 1.0) override;
|
void moveWindow(EffectWindow* w, const QPoint& pos, bool snap = false, double snapAdjust = 1.0) override;
|
||||||
|
@ -349,7 +347,6 @@ private:
|
||||||
EffectsIterator m_currentPaintWindowIterator;
|
EffectsIterator m_currentPaintWindowIterator;
|
||||||
EffectsIterator m_currentPaintEffectFrameIterator;
|
EffectsIterator m_currentPaintEffectFrameIterator;
|
||||||
EffectsIterator m_currentPaintScreenIterator;
|
EffectsIterator m_currentPaintScreenIterator;
|
||||||
EffectsIterator m_currentBuildQuadsIterator;
|
|
||||||
typedef QHash< QByteArray, QList< Effect*> > PropertyEffectMap;
|
typedef QHash< QByteArray, QList< Effect*> > PropertyEffectMap;
|
||||||
PropertyEffectMap m_propertiesForEffects;
|
PropertyEffectMap m_propertiesForEffects;
|
||||||
QHash<QByteArray, qulonglong> m_managedProperties;
|
QHash<QByteArray, qulonglong> m_managedProperties;
|
||||||
|
@ -493,7 +490,7 @@ public:
|
||||||
EffectWindow* transientFor() override;
|
EffectWindow* transientFor() override;
|
||||||
EffectWindowList mainWindows() const override;
|
EffectWindowList mainWindows() const override;
|
||||||
|
|
||||||
WindowQuadList buildQuads(bool force = false) const override;
|
WindowQuadList buildQuads() const override;
|
||||||
|
|
||||||
void minimize() override;
|
void minimize() override;
|
||||||
void unminimize() override;
|
void unminimize() override;
|
||||||
|
|
|
@ -609,11 +609,6 @@ void Effect::drawWindow(EffectWindow* w, int mask, const QRegion ®ion, Window
|
||||||
effects->drawWindow(w, mask, region, data);
|
effects->drawWindow(w, mask, region, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Effect::buildQuads(EffectWindow* w, WindowQuadList& quadList)
|
|
||||||
{
|
|
||||||
effects->buildQuads(w, quadList);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Effect::setPositionTransformations(WindowPaintData& data, QRect& region, EffectWindow* w,
|
void Effect::setPositionTransformations(WindowPaintData& data, QRect& region, EffectWindow* w,
|
||||||
const QRect& r, Qt::AspectRatioMode aspect)
|
const QRect& r, Qt::AspectRatioMode aspect)
|
||||||
{
|
{
|
||||||
|
|
|
@ -512,12 +512,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data);
|
virtual void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data);
|
||||||
|
|
||||||
/**
|
|
||||||
* Define new window quads so that they can be transformed by other effects.
|
|
||||||
* It's up to the effect to keep track of them.
|
|
||||||
*/
|
|
||||||
virtual void buildQuads(EffectWindow* w, WindowQuadList& quadList);
|
|
||||||
|
|
||||||
virtual void windowInputMouseEvent(QEvent* e);
|
virtual void windowInputMouseEvent(QEvent* e);
|
||||||
virtual void grabbedKeyboardEvent(QKeyEvent* e);
|
virtual void grabbedKeyboardEvent(QKeyEvent* e);
|
||||||
|
|
||||||
|
@ -844,7 +838,6 @@ public:
|
||||||
virtual void postPaintWindow(EffectWindow* w) = 0;
|
virtual void postPaintWindow(EffectWindow* w) = 0;
|
||||||
virtual void paintEffectFrame(EffectFrame* frame, const QRegion ®ion, double opacity, double frameOpacity) = 0;
|
virtual void paintEffectFrame(EffectFrame* frame, const QRegion ®ion, double opacity, double frameOpacity) = 0;
|
||||||
virtual void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) = 0;
|
virtual void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) = 0;
|
||||||
virtual void buildQuads(EffectWindow* w, WindowQuadList& quadList) = 0;
|
|
||||||
virtual QVariant kwinOption(KWinOption kwopt) = 0;
|
virtual QVariant kwinOption(KWinOption kwopt) = 0;
|
||||||
/**
|
/**
|
||||||
* Sets the cursor while the mouse is intercepted.
|
* Sets the cursor while the mouse is intercepted.
|
||||||
|
@ -2440,7 +2433,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Returns the unmodified window quad list. Can also be used to force rebuilding.
|
* Returns the unmodified window quad list. Can also be used to force rebuilding.
|
||||||
*/
|
*/
|
||||||
virtual WindowQuadList buildQuads(bool force = false) const = 0;
|
virtual WindowQuadList buildQuads() const = 0;
|
||||||
|
|
||||||
void setMinimized(bool minimize);
|
void setMinimized(bool minimize);
|
||||||
virtual void minimize() = 0;
|
virtual void minimize() = 0;
|
||||||
|
|
|
@ -905,7 +905,6 @@ WindowQuadList Scene::Window::buildQuads(bool force) const
|
||||||
if (shadowItem() && toplevel->wantsShadowToBeRendered()) {
|
if (shadowItem() && toplevel->wantsShadowToBeRendered()) {
|
||||||
*ret << shadowItem()->shadow()->shadowQuads();
|
*ret << shadowItem()->shadow()->shadowQuads();
|
||||||
}
|
}
|
||||||
effects->buildQuads(toplevel->effectWindow(), *ret);
|
|
||||||
cached_quad_list.reset(ret);
|
cached_quad_list.reset(ret);
|
||||||
return *ret;
|
return *ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue