[wayland] Drop threaded eglInitialize hack

The hack to perform the first eglInitialize in a thread is no longer
needed, as our internal QPA plugin is either able to share the
EGLDisplay or performs the potentially blocking eglInitialize in a
thread.
This commit is contained in:
Martin Gräßlin 2015-08-18 08:21:23 +02:00
parent e90fc1f8e1
commit cc27042a7b

View file

@ -201,29 +201,12 @@ void ApplicationWayland::continueStartupWithX()
}
}
// HACK: create a QWindow in a thread to force QtWayland to create the client buffer integration
// this performs an eglInitialize which would block as it does a roundtrip to the Wayland server
// in the main thread. By moving into a thread we get the initialize without hitting the problem
// This needs to be done before creating the Workspace as from inside Workspace the dangerous code
// gets hit in the main thread
QFutureWatcher<void> *eglInitWatcher = new QFutureWatcher<void>(this);
connect(eglInitWatcher, &QFutureWatcher<void>::finished, this,
[this, eglInitWatcher] {
eglInitWatcher->deleteLater();
createWorkspace();
createWorkspace();
Xcb::sync(); // Trigger possible errors, there's still a chance to abort
Xcb::sync(); // Trigger possible errors, there's still a chance to abort
notifyKSplash();
waylandServer()->createDummyQtWindow();
}
);
eglInitWatcher->setFuture(QtConcurrent::run([] {
QWindow w;
w.setSurfaceType(QSurface::RasterGLSurface);
w.create();
}));
notifyKSplash();
waylandServer()->createDummyQtWindow();
}
void ApplicationWayland::createX11Connection()