summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2020-04-27 08:51:53 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-04-29 13:51:58 +0200
commit6319bc72e2dc63175ca797ee3042955f852e008f (patch)
treec9c1c71c43394a4cd2f0f6a75df8ba6f3a2550f3 /src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
parent00c8a79da0c80616f18329cdfc61338a2c1af7df (diff)
parent28e7d940c42c47cf039522709883ae3de9f4fb88 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: tests/auto/client/xdgoutput/tst_xdgoutput.cpp Regenerated CMake projects. Removed duplicate wayland source in tests/auto/client/xdgoutput/xdgoutput.pro. It's still referenced via the included shared.pri file. Regenerated the CMake project to adapt to that. Otherwise the CMake project fails to configure due to duplicate rules with a error like the one below CMake Error at src/compositor/Qt6WaylandCompositorMacros.cmake:13 (add_custom_command): Attempt to add a custom rule to output tests/auto/client/xdgoutput/wayland-xdg-output-unstable-v1-server-protocol.h.rule Also use a workaround fix for configuring CMake standalone tests due to regression introduced by dd7e40b1086020f6a054957f4972720cd684 in qtbase. Change-Id: Ib364b851a1fa828c153efbf8653c9e4ef5e618cd
Diffstat (limited to 'src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp')
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index 49f970894..8bacd38cc 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -398,7 +398,7 @@ WaylandEglClientBufferIntegration::~WaylandEglClientBufferIntegration()
}
}
-bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *display)
+void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *display)
{
Q_D(WaylandEglClientBufferIntegration);
@@ -408,21 +408,21 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
if (!nativeInterface) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. No native platform interface available.";
- return false;
+ return;
}
d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay");
if (!d->egl_display) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not get EglDisplay for window.";
- return false;
+ return;
}
const char *extensionString = eglQueryString(d->egl_display, EGL_EXTENSIONS);
if ((!extensionString || !strstr(extensionString, "EGL_WL_bind_wayland_display")) && !ignoreBindDisplay) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. There is no EGL_WL_bind_wayland_display extension.";
- return false;
+ return;
}
d->egl_bind_wayland_display = reinterpret_cast<PFNEGLBINDWAYLANDDISPLAYWL>(eglGetProcAddress("eglBindWaylandDisplayWL"));
@@ -430,14 +430,14 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
if ((!d->egl_bind_wayland_display || !d->egl_unbind_wayland_display) && !ignoreBindDisplay) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not find eglBindWaylandDisplayWL and eglUnbindWaylandDisplayWL.";
- return false;
+ return;
}
d->egl_query_wayland_buffer = reinterpret_cast<PFNEGLQUERYWAYLANDBUFFERWL_compat>(eglGetProcAddress("eglQueryWaylandBufferWL"));
if (!d->egl_query_wayland_buffer) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not find eglQueryWaylandBufferWL.";
- return false;
+ return;
}
d->egl_create_image = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(eglGetProcAddress("eglCreateImageKHR"));
@@ -445,7 +445,7 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
if (!d->egl_create_image || !d->egl_destroy_image) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not find eglCreateImageKHR and eglDestroyImageKHR.";
- return false;
+ return;
}
if (d->egl_bind_wayland_display && d->egl_unbind_wayland_display) {
@@ -454,7 +454,7 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
if (!ignoreBindDisplay) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not bind Wayland display.";
- return false;
+ return;
} else {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Could not bind Wayland display. Ignoring.";
}
@@ -464,8 +464,6 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
d->funcs = new QEGLStreamConvenience;
d->funcs->initialize(d->egl_display);
-
- return true;
}
QtWayland::ClientBuffer *WaylandEglClientBufferIntegration::createBufferFor(wl_resource *buffer)