diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-26 03:06:36 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-26 03:06:36 +0200 |
commit | 3c5a3654c1f68cd7ee7e801ab098510ebc6a9071 (patch) | |
tree | 69e425ccc47b575d50e232b21208109ed0ddf925 /src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp | |
parent | 3d161cef55eacafc4495e3ba0bcb86089c544dc1 (diff) | |
parent | 137966a6293b50f6b248d130a2e36e67df49335e (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: If09bb13aa7a0aadd5cfb8265166d3b9d1b22e2f1
Diffstat (limited to 'src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp')
-rw-r--r-- | src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp index cbbe397f8..fe35b92cd 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp @@ -393,7 +393,7 @@ WaylandEglClientBufferIntegration::~WaylandEglClientBufferIntegration() } } -void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *display) +bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *display) { Q_D(WaylandEglClientBufferIntegration); @@ -402,39 +402,39 @@ void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); if (!nativeInterface) { qWarning("QtCompositor: Failed to initialize EGL display. No native platform interface available."); - return; + return false; } d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay"); if (!d->egl_display) { qWarning("QtCompositor: Failed to initialize EGL display. Could not get EglDisplay for window."); - return; + return false; } const char *extensionString = eglQueryString(d->egl_display, EGL_EXTENSIONS); if ((!extensionString || !strstr(extensionString, "EGL_WL_bind_wayland_display")) && !ignoreBindDisplay) { qWarning("QtCompositor: Failed to initialize EGL display. There is no EGL_WL_bind_wayland_display extension."); - return; + return false; } d->egl_bind_wayland_display = reinterpret_cast<PFNEGLBINDWAYLANDDISPLAYWL>(eglGetProcAddress("eglBindWaylandDisplayWL")); d->egl_unbind_wayland_display = reinterpret_cast<PFNEGLUNBINDWAYLANDDISPLAYWL>(eglGetProcAddress("eglUnbindWaylandDisplayWL")); if ((!d->egl_bind_wayland_display || !d->egl_unbind_wayland_display) && !ignoreBindDisplay) { qWarning("QtCompositor: Failed to initialize EGL display. Could not find eglBindWaylandDisplayWL and eglUnbindWaylandDisplayWL."); - return; + return false; } d->egl_query_wayland_buffer = reinterpret_cast<PFNEGLQUERYWAYLANDBUFFERWL_compat>(eglGetProcAddress("eglQueryWaylandBufferWL")); if (!d->egl_query_wayland_buffer) { qWarning("QtCompositor: Failed to initialize EGL display. Could not find eglQueryWaylandBufferWL."); - return; + return false; } d->egl_create_image = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(eglGetProcAddress("eglCreateImageKHR")); d->egl_destroy_image = reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(eglGetProcAddress("eglDestroyImageKHR")); if (!d->egl_create_image || !d->egl_destroy_image) { qWarning("QtCompositor: Failed to initialize EGL display. Could not find eglCreateImageKHR and eglDestroyImageKHR."); - return; + return false; } if (d->egl_bind_wayland_display && d->egl_unbind_wayland_display) { @@ -442,7 +442,7 @@ void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di if (!d->display_bound) { if (!ignoreBindDisplay) { qWarning("QtCompositor: Failed to initialize EGL display. Could not bind Wayland display."); - return; + return false; } else { qWarning("QtCompositor: Could not bind Wayland display. Ignoring."); } @@ -454,6 +454,7 @@ void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di d->funcs->initialize(d->egl_display); d->valid = true; + return true; } QtWayland::ClientBuffer *WaylandEglClientBufferIntegration::createBufferFor(wl_resource *buffer) |