diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-02-16 12:29:36 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-03-02 08:24:23 (GMT) |
commit | 28b85c76dd0ba4796ec519b890f6fab0fc813061 (patch) | |
tree | 4defe4c405a29fb1c07bb4392258e8f1ccf4f0e7 /src/opengl/qpixmapdata_x11gl_egl.cpp | |
parent | 56d32b57814cb35409bc9b0076ec753de488ae7f (diff) | |
download | Qt-28b85c76dd0ba4796ec519b890f6fab0fc813061.zip Qt-28b85c76dd0ba4796ec519b890f6fab0fc813061.tar.gz Qt-28b85c76dd0ba4796ec519b890f6fab0fc813061.tar.bz2 |
Move static methods from QEglContext to QEgl namespace
Reviewed-By: Aleksandar Sasha Babic
Diffstat (limited to 'src/opengl/qpixmapdata_x11gl_egl.cpp')
-rw-r--r-- | src/opengl/qpixmapdata_x11gl_egl.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp index 4f1543c..811e554 100644 --- a/src/opengl/qpixmapdata_x11gl_egl.cpp +++ b/src/opengl/qpixmapdata_x11gl_egl.cpp @@ -97,14 +97,14 @@ bool QX11GLPixmapData::hasX11GLPixmaps() #endif EGL_NONE }; - qPixmapARGBSharedEglContext = eglCreateContext(QEglContext::display(), + qPixmapARGBSharedEglContext = eglCreateContext(QEgl::display(), argbConfig, 0, contextAttribs); if (argbConfig == rgbConfig) { // If the configs are the same, we can re-use the same context. qPixmapRGBSharedEglContext = qPixmapARGBSharedEglContext; } else { - qPixmapRGBSharedEglContext = eglCreateContext(QEglContext::display(), + qPixmapRGBSharedEglContext = eglCreateContext(QEgl::display(), rgbConfig, 0, contextAttribs); } @@ -115,13 +115,12 @@ bool QX11GLPixmapData::hasX11GLPixmaps() if (!qt_createEGLSurfaceForPixmap(argbPixmapData, false)) break; - haveX11Pixmaps = eglMakeCurrent(QEglContext::display(), + haveX11Pixmaps = eglMakeCurrent(QEgl::display(), (EGLSurface)argbPixmapData->gl_surface, (EGLSurface)argbPixmapData->gl_surface, qPixmapARGBSharedEglContext); if (!haveX11Pixmaps) { - EGLint err = eglGetError(); - qWarning() << "Unable to make pixmap config current:" << err << QEglContext::errorString(err); + qWarning() << "Unable to make pixmap config current:" << QEgl::errorString(); break; } @@ -135,20 +134,19 @@ bool QX11GLPixmapData::hasX11GLPixmaps() if (!qt_createEGLSurfaceForPixmap(rgbPixmapData, false)) break; - haveX11Pixmaps = eglMakeCurrent(QEglContext::display(), + haveX11Pixmaps = eglMakeCurrent(QEgl::display(), (EGLSurface)rgbPixmapData->gl_surface, (EGLSurface)rgbPixmapData->gl_surface, qPixmapRGBSharedEglContext); if (!haveX11Pixmaps) { - EGLint err = eglGetError(); - qWarning() << "Unable to make pixmap config current:" << err << QEglContext::errorString(err); + qWarning() << "Unable to make pixmap config current:" << QEgl::errorString(); break; } } } while (0); if (qPixmapARGBSharedEglContext || qPixmapRGBSharedEglContext) { - eglMakeCurrent(QEglContext::display(), + eglMakeCurrent(QEgl::display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); } @@ -168,12 +166,12 @@ bool QX11GLPixmapData::hasX11GLPixmaps() if (!haveX11Pixmaps) { // Clean up the context(s) if we can't use X11GL pixmaps if (qPixmapARGBSharedEglContext != EGL_NO_CONTEXT) - eglDestroyContext(QEglContext::display(), qPixmapARGBSharedEglContext); + eglDestroyContext(QEgl::display(), qPixmapARGBSharedEglContext); if (qPixmapRGBSharedEglContext != qPixmapARGBSharedEglContext && qPixmapRGBSharedEglContext != EGL_NO_CONTEXT) { - eglDestroyContext(QEglContext::display(), qPixmapRGBSharedEglContext); + eglDestroyContext(QEgl::display(), qPixmapRGBSharedEglContext); } qPixmapRGBSharedEglContext = EGL_NO_CONTEXT; qPixmapARGBSharedEglContext = EGL_NO_CONTEXT; |