summaryrefslogtreecommitdiffstats
path: root/src/gui/egl
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2010-06-25 13:47:58 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-06-25 13:47:58 (GMT)
commit075648e46650797f2b520f98513a7aed9f0ffec7 (patch)
treefb52bfb9037c9b78bfe8601393d6d95548094947 /src/gui/egl
parent287f6e933add5dc822c484170c5fece25c7ac846 (diff)
downloadQt-075648e46650797f2b520f98513a7aed9f0ffec7.zip
Qt-075648e46650797f2b520f98513a7aed9f0ffec7.tar.gz
Qt-075648e46650797f2b520f98513a7aed9f0ffec7.tar.bz2
Warn if surface creation fails
Output the same warning that qegl.cpp does also in the X11 implementation. Reviewed-by: Trond Kjernåsen <trond.kjernasen@nokia.com>
Diffstat (limited to 'src/gui/egl')
-rw-r--r--src/gui/egl/qegl_x11.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index 969acc4..fea6e8d 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -415,7 +415,10 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg
// At this point, the widget's window should be created and have the correct visual. Now we
// just need to create the EGL surface for it:
- return eglCreateWindowSurface(QEgl::display(), config, (EGLNativeWindowType)widget->winId(), 0);
+ EGLSurface surf = eglCreateWindowSurface(QEgl::display(), config, (EGLNativeWindowType)widget->winId(), 0);
+ if (surf == EGL_NO_SURFACE)
+ qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
+ return surf;
}
if (x11PixmapData) {