Commit 4c814590 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Fix textureForOutput for the EglWaylandBackend

Ensure we get our texture from the right output
parent eb760505
......@@ -309,6 +309,17 @@ static QVector<EGLint> regionToRects(const QRegion &region, AbstractWaylandOutpu
return rects;
}
QSharedPointer<KWin::GLTexture> EglWaylandBackend::textureForOutput(KWin::AbstractOutput *output) const
{
QSharedPointer<GLTexture> texture(new GLTexture(GL_RGBA8, output->pixelSize()));
GLRenderTarget::pushRenderTarget(m_outputs[output]->renderTarget());
GLRenderTarget renderTarget(texture.data());
renderTarget.blitFromFramebuffer(QRect(0, texture->height(), texture->width(), -texture->height()));
GLRenderTarget::popRenderTarget();
return texture;
}
void EglWaylandBackend::aboutToStartPainting(AbstractOutput *output, const QRegion &damagedRegion)
{
Q_ASSERT_X(output, "aboutToStartPainting", "not using per screen rendering");
......
......@@ -83,6 +83,7 @@ public:
return m_havePlatformBase;
}
QSharedPointer<KWin::GLTexture> textureForOutput(KWin::AbstractOutput *output) const override;
void aboutToStartPainting(AbstractOutput *output, const QRegion &damage) override;
private:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment