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:
parent
a317a3f6bc
commit
d543c0dff6
12 changed files with 12 additions and 18 deletions
|
@ -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.
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue