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
This commit is contained in:
Aleix Pol 2021-01-26 02:56:21 +01:00 committed by Aleix Pol Gonzalez
parent 38e656ba7e
commit 92c00d1dc3

View file

@ -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));
GLRenderTarget::pushRenderTarget(framebuffer.data());