Call GLRenderTarget::setVirtualScreenGeometry prior to self test

Summary:
The shader self test uses GLRenderTarget and restores the viewport. Due
to the setVirtualScreenGeometry not being set the calculated viewport is
incorrect and any rendering breaks. This is a regression introduced with
1708278a45 which only affects Wayland
backends which do not perform per screen rendering.

The glxbackend was not affected as it sets the viewport on screen
geometry change.

Reviewers: bshah, #plasma_on_wayland, #kwin

Reviewed By: bshah, #plasma_on_wayland, #kwin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3155
This commit is contained in:
Martin Gräßlin 2016-10-25 14:13:54 +05:30 committed by Bhushan Shah
parent 8d6639209b
commit f792c82528

View file

@ -1012,6 +1012,7 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend, QObject *parent)
const QSize &s = screens()->size();
GLRenderTarget::setVirtualScreenSize(s);
GLRenderTarget::setVirtualScreenGeometry(screens()->geometry());
// push one shader on the stack so that one is always bound
ShaderManager::instance()->pushShader(ShaderTrait::MapTexture);