Don't check window system when creating SceneQPainter
Summary: For one SceneQPainter is only used on Wayland and it can be created through the Platform, so no different code pathes needed even if we had SceneQPainter on X11. Reviewers: #plasma Subscribers: plasma-devel Projects: #plasma Differential Revision: https://phabricator.kde.org/D1416
This commit is contained in:
parent
4ef07494bd
commit
d47e206beb
1 changed files with 7 additions and 11 deletions
|
@ -94,9 +94,7 @@ QImage *QPainterBackend::bufferForScreen(int screenId)
|
|||
//****************************************
|
||||
SceneQPainter *SceneQPainter::createScene(QObject *parent)
|
||||
{
|
||||
QScopedPointer<QPainterBackend> backend;
|
||||
if (kwinApp()->shouldUseWaylandForCompositing()) {
|
||||
backend.reset(kwinApp()->platform()->createQPainterBackend());
|
||||
QScopedPointer<QPainterBackend> backend(kwinApp()->platform()->createQPainterBackend());
|
||||
if (backend.isNull()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -105,8 +103,6 @@ SceneQPainter *SceneQPainter::createScene(QObject *parent)
|
|||
}
|
||||
return new SceneQPainter(backend.take(), parent);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SceneQPainter::SceneQPainter(QPainterBackend *backend, QObject *parent)
|
||||
: Scene(parent)
|
||||
|
|
Loading…
Reference in a new issue