summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2014-08-17 13:51:15 +0200
committerRobin Burchell <robin.burchell@viroteck.net>2014-08-18 14:27:49 +0200
commitbb1a52db162a3b5dd6084d0d9d4ecef3a7eacec3 (patch)
tree2f96a56cfe4f9d15eb68072d2a49d61c022bccb1 /src/hardwareintegration
parent9a4d55b1cdd0f19267794bf58652fcdbf1efeefc (diff)
wayland-egl: Logging cleanup.
Prefix warnings with QtCompositor so it's clear where they are coming from. Remove trailing newlines from messages, they aren't needed. Also, only warn if something actually goes wrong. Change-Id: I88b8b03480d938a08a84a4964108d10d86606be6 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'src/hardwareintegration')
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index 37aa3ffca..5971a3ec6 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -115,66 +115,68 @@ void WaylandEglClientBufferIntegration::initializeHardware(QtWayland::Display *w
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
if (!nativeInterface) {
- qWarning("Failed to initialize egl display. No native platform interface available.\n");
+ qWarning("QtCompositor: Failed to initialize EGL display. No native platform interface available.");
return;
}
d->egl_display = nativeInterface->nativeResourceForWindow("EglDisplay", m_compositor->window());
if (!d->egl_display) {
- qWarning("Failed to initialize egl display. Could not get EglDisplay for window.\n");
+ qWarning("QtCompositor: Failed to initialize EGL display. Could not get EglDisplay for window.");
return;
}
const char *extensionString = eglQueryString(d->egl_display, EGL_EXTENSIONS);
if ((!extensionString || !strstr(extensionString, "EGL_WL_bind_wayland_display")) && !ignoreBindDisplay) {
- qWarning("Failed to initialize egl display. There is no EGL_WL_bind_wayland_display extension.\n");
+ qWarning("QtCompositor: Failed to initialize EGL display. There is no EGL_WL_bind_wayland_display extension.");
return;
}
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("Failed to initialize egl display. Could not find eglBindWaylandDisplayWL and eglUnbindWaylandDisplayWL.\n");
+ qWarning("QtCompositor: Failed to initialize EGL display. Could not find eglBindWaylandDisplayWL and eglUnbindWaylandDisplayWL.");
return;
}
d->egl_query_wayland_buffer = reinterpret_cast<PFNEGLQUERYWAYLANDBUFFERWL_compat>(eglGetProcAddress("eglQueryWaylandBufferWL"));
if (!d->egl_query_wayland_buffer) {
- qWarning("Failed to initialize egl display. Could not find eglQueryWaylandBufferWL.\n");
+ qWarning("QtCompositor: Failed to initialize EGL display. Could not find eglQueryWaylandBufferWL.");
return;
}
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("Failed to initialize egl display. Could not find eglCreateImageKHR and eglDestroyImageKHR.\n");
+ qWarning("QtCompositor: Failed to initialize EGL display. Could not find eglCreateImageKHR and eglDestroyImageKHR.");
return;
}
d->gl_egl_image_target_texture_2d = reinterpret_cast<PFNGLEGLIMAGETARGETTEXTURE2DOESPROC>(eglGetProcAddress("glEGLImageTargetTexture2DOES"));
if (!d->gl_egl_image_target_texture_2d) {
- qWarning("Failed to initialize egl display. Could not find glEGLImageTargetTexture2DOES.\n");
+ qWarning("QtCompositor: Failed to initialize EGL display. Could not find glEGLImageTargetTexture2DOES.");
return;
}
if (d->egl_bind_wayland_display && d->egl_unbind_wayland_display) {
d->display_bound = d->egl_bind_wayland_display(d->egl_display, waylandDisplay->handle());
- if (!d->display_bound && !ignoreBindDisplay) {
- qWarning("Failed to initialize egl display. Could not bind Wayland display.\n");
- return;
+ if (!d->display_bound) {
+ if (!ignoreBindDisplay) {
+ qWarning("QtCompositor: Failed to initialize EGL display. Could not bind Wayland display.");
+ return;
+ } else {
+ qWarning("QtCompositor: Could not bind Wayland display. Ignoring.");
+ }
}
}
d->valid = true;
-
- qWarning("EGL Wayland extension successfully initialized.%s\n", !d->display_bound ? " eglBindWaylandDisplayWL ignored" : "");
}
void WaylandEglClientBufferIntegration::bindTextureToBuffer(struct ::wl_resource *buffer)
{
Q_D(WaylandEglClientBufferIntegration);
if (!d->valid) {
- qWarning("bindTextureToBuffer() failed");
+ qWarning("QtCompositor: bindTextureToBuffer() failed");
return;
}