diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2017-10-03 16:09:21 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2017-10-25 10:42:04 +0000 |
commit | f1407493d6d25f24a3c71fbcedc00598baa44b56 (patch) | |
tree | d8c9a904f5980b1b301046e8d51593ca462994fd /examples/wayland/pure-qml/main.cpp | |
parent | a5c4af696b4fa0747b278830d07f4360e73b1f63 (diff) | |
download | qtwayland-f1407493d6d25f24a3c71fbcedc00598baa44b56.tar.gz |
Support threaded rendering for Nvidia EGLStreams
Create and update the texture on the GUI thread. Make sure there
is a valid context on the GUI thread: create one if necessary, and
share it with the global share context.
Note: this requires that threaded compositors set the
Qt::AA_ShareOpenGLContexts application attribute.
Task-number: QTBUG-63039
Change-Id: Ia19af0536f9df319cde84221ed53db1c2ef42293
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'examples/wayland/pure-qml/main.cpp')
-rw-r--r-- | examples/wayland/pure-qml/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/wayland/pure-qml/main.cpp b/examples/wayland/pure-qml/main.cpp index 304b13c4..38ed5c93 100644 --- a/examples/wayland/pure-qml/main.cpp +++ b/examples/wayland/pure-qml/main.cpp @@ -57,6 +57,9 @@ int main(int argc, char *argv[]) { + // ShareOpenGLContexts is needed for using the threaded renderer + // on Nvidia EGLStreams + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QGuiApplication app(argc, argv); QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); |