diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-25 00:21:23 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-25 00:21:23 (GMT) |
commit | f3d15516572394b6bcd44a89dd66516fa4eba56e (patch) | |
tree | b97aa3bc1826d21e6fd8b39f657b1e1e63369270 /src/gui/egl/qegl_x11.cpp | |
parent | 7421f79f57f475b9e96e53e5cbd9861c428d4ae3 (diff) | |
download | Qt-f3d15516572394b6bcd44a89dd66516fa4eba56e.zip Qt-f3d15516572394b6bcd44a89dd66516fa4eba56e.tar.gz Qt-f3d15516572394b6bcd44a89dd66516fa4eba56e.tar.bz2 |
Remove the storage of the EGLSurface from QEglContext
Reviewed-by: Sarah Smith
Diffstat (limited to 'src/gui/egl/qegl_x11.cpp')
-rw-r--r-- | src/gui/egl/qegl_x11.cpp | 8 |
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) |