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