Commit 2daa5a62 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

screencasting: generate the composed textures with the proper size

Don't neglect the scale of the buffer for windows that we are rendering
on the spot.
Otherwise we will be offering a smaller size to what we are generally
using. More importantly, the ScreencastManager expects the buffers
scaled. This causes glitches when the stream starts otherwise as the
first frame triggers a resize.

CCBUG: 428594

(cherry picked from commit 92c00d1d)
parent 82fe38a1
......@@ -1521,8 +1521,8 @@ QSharedPointer<GLTexture> OpenGLWindow::windowTexture()
return QSharedPointer<GLTexture>(new GLTexture(*frame->texture()));
} else {
auto effectWindow = window()->effectWindow();
const QRect geo = window()->clientGeometry();
QSharedPointer<GLTexture> texture(new GLTexture(GL_RGBA8, geo.size()));
const QRect geo = window()->bufferGeometry();
QSharedPointer<GLTexture> texture(new GLTexture(GL_RGBA8, geo.size() * window()->bufferScale()));
QScopedPointer<GLRenderTarget> framebuffer(new KWin::GLRenderTarget(*texture));
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