Commit 38940780 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

platforms/drm: Properly clean up the shadow framebuffer object

In case hardware transforms can be used again, the shadow framebuffer
must be destroyed; otherwise rendered results will be distorted due to a
mismatch between the dimensions of the shadow framebuffer and the mode
size.
parent 9236254d
......@@ -345,6 +345,8 @@ const float texCoords[] = {
bool EglGbmBackend::resetFramebuffer(Output &output)
{
cleanupFramebuffer(output);
if (output.output->hardwareTransforms() && !output.onSecondaryGPU) {
// No need for an extra render target.
return true;
......@@ -352,8 +354,6 @@ bool EglGbmBackend::resetFramebuffer(Output &output)
makeContextCurrent(output);
cleanupFramebuffer(output);
glGenFramebuffers(1, &output.render.framebuffer);
glBindFramebuffer(GL_FRAMEBUFFER, output.render.framebuffer);
GLRenderTarget::setKWinFramebuffer(output.render.framebuffer);
......
Markdown is supported
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