diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-21 21:13:00 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-21 21:13:00 +0200 |
commit | 83fdd4018d05d658787c0cd49fdb766bff101234 (patch) | |
tree | 635389afc30841080f6a939e00ec02bb57cbf8bb /src/compositor/compositor_api/qwaylandcompositor.cpp | |
parent | 00b6314f79cf4d8b1ea2ba81dbafe7088c52ae84 (diff) | |
parent | 2e9771ae81597d4c85d8dc103dbf55fe8870764d (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I82c07ab72138774a0809bf60f0f3251d32923847
Diffstat (limited to 'src/compositor/compositor_api/qwaylandcompositor.cpp')
-rw-r--r-- | src/compositor/compositor_api/qwaylandcompositor.cpp | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp index ccc87a477..18d8da4fb 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandcompositor.cpp @@ -377,6 +377,9 @@ void QWaylandCompositorPrivate::initializeHardwareIntegration() loadClientBufferIntegration(); loadServerBufferIntegration(); + + if (client_buffer_integration) + client_buffer_integration->initializeHardware(display); #endif } @@ -406,32 +409,12 @@ void QWaylandCompositorPrivate::loadClientBufferIntegration() if (!targetKey.isEmpty()) { client_buffer_integration.reset(QtWayland::ClientBufferIntegrationFactory::create(targetKey, QStringList())); if (client_buffer_integration) { - qCDebug(qLcWaylandCompositorHardwareIntegration) << "Loaded client buffer integration:" << targetKey; client_buffer_integration->setCompositor(q); - if (!client_buffer_integration->initializeHardware(display)) { - qCWarning(qLcWaylandCompositorHardwareIntegration) - << "Failed to initialize hardware for client buffer integration:" << targetKey; - client_buffer_integration.reset(); - } - } else { - qCWarning(qLcWaylandCompositorHardwareIntegration) - << "Failed to load client buffer integration:" << targetKey; + if (hw_integration) + hw_integration->setClientBufferIntegration(targetKey); } } - - if (!client_buffer_integration) { - qCWarning(qLcWaylandCompositorHardwareIntegration) - << "No client buffer integration was loaded, this means that clients will fall back" - << "to use CPU buffers (wl_shm) for transmitting buffers instead of using zero-copy" - << "GPU buffer handles. Expect serious performance impact with OpenGL clients due" - << "to potentially multiple copies between CPU and GPU memory per buffer.\n" - << "See the QtWayland readme for more info about how to build and configure Qt for" - << "your device."; - return; - } - - if (client_buffer_integration && hw_integration) - hw_integration->setClientBufferIntegration(targetKey); + //BUG: if there is no client buffer integration, bad things will happen when opengl is used #endif } |