Remove unused mask param in QPainterBackend::endFrame()

It is unused and it is not a good idea to pass Scene's mask to the
render backend as it results in higher coupling between Platform and
Scene.
This commit is contained in:
Vlad Zahorodnii 2021-07-23 17:33:27 +03:00 committed by Aleix Pol Gonzalez
parent a317a3f6bc
commit d543c0dff6
12 changed files with 12 additions and 18 deletions

View file

@ -29,7 +29,7 @@ public:
PlatformSurfaceTexture *createPlatformSurfaceTextureInternal(SurfacePixmapInternal *pixmap);
PlatformSurfaceTexture *createPlatformSurfaceTextureWayland(SurfacePixmapWayland *pixmap);
virtual void endFrame(int screenId, int mask, const QRegion &damage) = 0;
virtual void endFrame(int screenId, const QRegion &damage) = 0;
virtual void beginFrame(int screenId) = 0;
/**
* @brief React on screen geometry changes.

View file

@ -78,9 +78,8 @@ void DrmQPainterBackend::beginFrame(int screenId)
m_outputs[screenId].swapchain->acquireBuffer();
}
void DrmQPainterBackend::endFrame(int screenId, int mask, const QRegion &damage)
void DrmQPainterBackend::endFrame(int screenId, const QRegion &damage)
{
Q_UNUSED(mask)
Q_UNUSED(damage)
const Output &rendererOutput = m_outputs[screenId];

View file

@ -33,7 +33,7 @@ public:
QImage *bufferForScreen(int screenId) override;
bool needsFullRepaint(int screenId) const override;
void beginFrame(int screenId) override;
void endFrame(int screenId, int mask, const QRegion &damage) override;
void endFrame(int screenId, const QRegion &damage) override;
private:
void initOutput(DrmOutput *output);

View file

@ -82,10 +82,9 @@ void FramebufferQPainterBackend::beginFrame(int screenId)
m_needsFullRepaint = true;
}
void FramebufferQPainterBackend::endFrame(int screenId, int mask, const QRegion &damage)
void FramebufferQPainterBackend::endFrame(int screenId, const QRegion &damage)
{
Q_UNUSED(screenId)
Q_UNUSED(mask)
Q_UNUSED(damage)
if (!kwinApp()->platform()->session()->isActive()) {

View file

@ -27,7 +27,7 @@ public:
QImage *bufferForScreen(int screenId) override;
bool needsFullRepaint(int screenId) const override;
void beginFrame(int screenId) override;
void endFrame(int screenId, int mask, const QRegion &damage) override;
void endFrame(int screenId, const QRegion &damage) override;
private:
void reactivate();

View file

@ -53,9 +53,8 @@ void VirtualQPainterBackend::createOutputs()
}
}
void VirtualQPainterBackend::endFrame(int screenId, int mask, const QRegion &damage)
void VirtualQPainterBackend::endFrame(int screenId, const QRegion &damage)
{
Q_UNUSED(mask)
Q_UNUSED(damage)
VirtualOutput *output = static_cast<VirtualOutput *>(m_backend->findOutput(screenId));

View file

@ -29,7 +29,7 @@ public:
QImage *bufferForScreen(int screenId) override;
bool needsFullRepaint(int screenId) const override;
void beginFrame(int screenId) override;
void endFrame(int screenId, int mask, const QRegion &damage) override;
void endFrame(int screenId, const QRegion &damage) override;
private:
void createOutputs();

View file

@ -166,10 +166,8 @@ void WaylandQPainterBackend::createOutput(AbstractOutput *waylandOutput)
m_outputs << output;
}
void WaylandQPainterBackend::endFrame(int screenId, int mask, const QRegion &damage)
void WaylandQPainterBackend::endFrame(int screenId, const QRegion &damage)
{
Q_UNUSED(mask)
WaylandQPainterOutput *rendererOutput = m_outputs.value(screenId);
Q_ASSERT(rendererOutput);

View file

@ -73,7 +73,7 @@ public:
QImage *bufferForScreen(int screenId) override;
void endFrame(int screenId, int mask, const QRegion& damage) override;
void endFrame(int screenId, const QRegion& damage) override;
void beginFrame(int screenId) override;
bool needsFullRepaint(int screenId) const override;

View file

@ -61,9 +61,8 @@ void X11WindowedQPainterBackend::beginFrame(int screenId)
Q_UNUSED(screenId)
}
void X11WindowedQPainterBackend::endFrame(int screenId, int mask, const QRegion &damage)
void X11WindowedQPainterBackend::endFrame(int screenId, const QRegion &damage)
{
Q_UNUSED(mask)
Q_UNUSED(damage)
X11WindowedOutput *output = static_cast<X11WindowedOutput *>(kwinApp()->platform()->findOutput(screenId));

View file

@ -32,7 +32,7 @@ public:
QImage *bufferForScreen(int screenId) override;
bool needsFullRepaint(int screenId) const override;
void beginFrame(int screenId) override;
void endFrame(int screenId, int mask, const QRegion &damage) override;
void endFrame(int screenId, const QRegion &damage) override;
private:
void createOutputs();

View file

@ -110,7 +110,7 @@ void SceneQPainter::paint(int screenId, const QRegion &_damage, const QList<Topl
m_painter->end();
renderLoop->endFrame();
m_backend->endFrame(screenId, mask, updateRegion);
m_backend->endFrame(screenId, updateRegion);
}
// do cleanup