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.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.cpp')
-rw-r--r-- | src/gui/egl/qegl.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index a405bbb..f06c153 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -58,7 +58,6 @@ QEglContext::QEglContext() : apiType(QEgl::OpenGL) , dpy(EGL_NO_DISPLAY) , ctx(EGL_NO_CONTEXT) - , surf(EGL_NO_SURFACE) , cfg(0) , currentSurface(EGL_NO_SURFACE) , share(false) @@ -198,30 +197,6 @@ bool QEglContext::createContext(QEglContext *shareContext) return true; } -// Recreate the surface for a paint device because the native id has changed. -bool QEglContext::recreateSurface(QPaintDevice *device) -{ - // Bail out if the surface has not been created for the first time yet. - if (surf == EGL_NO_SURFACE) - return true; - - // Destroy the old surface. - eglDestroySurface(dpy, surf); - surf = EGL_NO_SURFACE; - - // Create a new one. - return createSurface(device); -} - -// Destroy the EGL surface object. -void QEglContext::destroySurface() -{ - if (surf != EGL_NO_SURFACE) { - eglDestroySurface(dpy, surf); - surf = EGL_NO_SURFACE; - } -} - // Destroy an EGL surface object. If it was current on this context // then call doneCurrent() for it first. void QEglContext::destroySurface(EGLSurface surface) @@ -230,8 +205,6 @@ void QEglContext::destroySurface(EGLSurface surface) if (surface == currentSurface) doneCurrent(); eglDestroySurface(dpy, surface); - if (surf == surface) - surf = EGL_NO_SURFACE; } } @@ -242,16 +215,10 @@ void QEglContext::destroy() eglDestroyContext(dpy, ctx); dpy = EGL_NO_DISPLAY; ctx = EGL_NO_CONTEXT; - surf = EGL_NO_SURFACE; cfg = 0; share = false; } -bool QEglContext::makeCurrent() -{ - return makeCurrent(surf); -} - bool QEglContext::makeCurrent(EGLSurface surface) { if (ctx == EGL_NO_CONTEXT) { @@ -316,17 +283,6 @@ bool QEglContext::lazyDoneCurrent() return true; } -bool QEglContext::swapBuffers() -{ - if(ctx == EGL_NO_CONTEXT) - return false; - - bool ok = eglSwapBuffers(dpy, surf); - if (!ok) - qWarning() << "QEglContext::swapBuffers():" << errorString(eglGetError()); - return ok; -} - bool QEglContext::swapBuffers(EGLSurface surface) { if(ctx == EGL_NO_CONTEXT) @@ -368,15 +324,6 @@ void QEglContext::waitClient() #endif } -// Query the actual size of the EGL surface. -QSize QEglContext::surfaceSize() const -{ - int w, h; - eglQuerySurface(dpy, surf, EGL_WIDTH, &w); - eglQuerySurface(dpy, surf, EGL_HEIGHT, &h); - return QSize(w, h); -} - // Query the value of a configuration attribute. bool QEglContext::configAttrib(int name, EGLint *value) const { |