summaryrefslogtreecommitdiffstats
path: root/src/gui/egl/qegl_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/egl/qegl_x11.cpp')
-rw-r--r--src/gui/egl/qegl_x11.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index 5f34f8e..9d556a8 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -54,7 +54,7 @@
QT_BEGIN_NAMESPACE
-bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
+EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
{
// Create the native drawable for the paint device.
int devType = device->devType();
@@ -72,7 +72,7 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
}
if (!ok) {
qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
- return false;
+ return EGL_NO_SURFACE;
}
// Create the EGL surface to draw into, based on the native drawable.
@@ -81,6 +81,7 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
props = properties->properties();
else
props = 0;
+ EGLSurface surf;
if (devType == QInternal::Widget)
surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props);
else
@@ -88,9 +89,8 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
if (surf == EGL_NO_SURFACE) {
qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:"
<< errorString(eglGetError());
- return false;
}
- return true;
+ return surf;
}
EGLDisplay QEglContext::getDisplay(QPaintDevice *device)