Commit d06746fa authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

scene: Set render target rect in Scene::paintScreen()

This ensures that the render target rect is set when using qpainter
render backend.
parent 2091cb06
Pipeline #138415 passed with stage
in 17 minutes and 10 seconds
......@@ -257,11 +257,8 @@ void Scene::paintScreen(AbstractOutput *output, const QList<Toplevel *> &topleve
createStackingOrder(toplevels);
painted_screen = output;
setRenderTargetRect(output->geometry());
setRenderTargetScale(output->scale());
QRegion update, valid;
paintScreen(renderTargetRect(), QRect(), &update, &valid);
paintScreen(output->geometry(), QRect(), &update, &valid);
clearStackingOrder();
}
......@@ -286,6 +283,14 @@ void Scene::paintScreen(const QRegion &damage, const QRegion &repaint,
auto effectsImpl = static_cast<EffectsHandlerImpl *>(effects);
effectsImpl->startPaint();
if (kwinApp()->platform()->isPerScreenRenderingEnabled()) {
setRenderTargetRect(painted_screen->geometry());
setRenderTargetScale(painted_screen->scale());
} else {
setRenderTargetRect(geometry());
setRenderTargetScale(1);
}
const QRegion displayRegion(renderTargetRect());
QRegion region = damage;
......
......@@ -195,14 +195,6 @@ void SceneOpenGL::paint(AbstractOutput *output, const QRegion &damage, const QLi
QRegion valid;
QRegion repaint;
if (kwinApp()->platform()->isPerScreenRenderingEnabled()) {
setRenderTargetRect(output->geometry());
setRenderTargetScale(output->scale());
} else {
setRenderTargetRect(geometry());
setRenderTargetScale(1);
}
renderLoop->beginFrame();
SurfaceItem *fullscreenSurface = nullptr;
......
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