diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2011-02-24 16:31:15 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2011-02-24 16:32:53 (GMT) |
commit | 1f50a3aa50b934a181cd0d18c260f2533ab63d43 (patch) | |
tree | 3b2a38b97a3547b52d820068e06bb3b5668594e7 /src/plugins/platforms/wayland/qwaylanddisplay.cpp | |
parent | 87c16f2bedaf1810cf9a96f65e5af0ad819bf9e5 (diff) | |
download | Qt-1f50a3aa50b934a181cd0d18c260f2533ab63d43.zip Qt-1f50a3aa50b934a181cd0d18c260f2533ab63d43.tar.gz Qt-1f50a3aa50b934a181cd0d18c260f2533ab63d43.tar.bz2 |
Make it build when EGL is not available
Reviewed-by: Jørgen
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylanddisplay.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylanddisplay.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index ca23165..c3e87a1 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -171,8 +171,9 @@ void QWaylandDisplay::flushRequests(void) QWaylandDisplay::QWaylandDisplay(void) : mWriteNotifier(0) { +#ifdef QT_WAYLAND_GL_SUPPORT EGLint major, minor; - +#endif mDisplay = wl_display_connect(NULL); if (mDisplay == NULL) { fprintf(stderr, "failed to create display: %m\n"); @@ -182,6 +183,7 @@ QWaylandDisplay::QWaylandDisplay(void) wl_display_add_global_listener(mDisplay, QWaylandDisplay::displayHandleGlobal, this); +#ifdef QT_WAYLAND_GL_SUPPORT mNativeEglDisplay = wl_egl_display_create(mDisplay); mEglDisplay = eglGetDisplay((EGLNativeDisplayType)mNativeEglDisplay); @@ -193,6 +195,12 @@ QWaylandDisplay::QWaylandDisplay(void) return; } } +#else + mNativeEglDisplay = 0; + mEglDisplay = 0; +#endif + + eventDispatcher(); int fd = wl_display_get_fd(mDisplay, sourceUpdate, this); mReadNotifier = new QSocketNotifier(fd, QSocketNotifier::Read, this); @@ -208,7 +216,9 @@ QWaylandDisplay::QWaylandDisplay(void) QWaylandDisplay::~QWaylandDisplay(void) { close(mFd); +#ifdef QT_WAYLAND_GL_SUPPORT eglTerminate(mEglDisplay); +#endif wl_display_destroy(mDisplay); } |