summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglconvenience
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-03-23 12:41:28 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-23 13:07:52 (GMT)
commit2905f11e8e8fe7e05d61cec9fcc1d78ff91f0f31 (patch)
treeb6f17ae6df26f14496dbdeb2cc35ba3c76444935 /src/plugins/platforms/eglconvenience
parent9f6eb99448d3ee8cbdd1c5b41903176759b1664f (diff)
downloadQt-2905f11e8e8fe7e05d61cec9fcc1d78ff91f0f31.zip
Qt-2905f11e8e8fe7e05d61cec9fcc1d78ff91f0f31.tar.gz
Qt-2905f11e8e8fe7e05d61cec9fcc1d78ff91f0f31.tar.bz2
Avoid duplicate calls to eglGetDisplay() in XCB / Xlib platforms.
Just call eglGetDisplay() once, as we also need to call eglInitialize() before the display can be used validly.
Diffstat (limited to 'src/plugins/platforms/eglconvenience')
-rw-r--r--src/plugins/platforms/eglconvenience/qxlibeglintegration.cpp4
-rw-r--r--src/plugins/platforms/eglconvenience/qxlibeglintegration.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/platforms/eglconvenience/qxlibeglintegration.cpp b/src/plugins/platforms/eglconvenience/qxlibeglintegration.cpp
index 7f296c5..45746e9 100644
--- a/src/plugins/platforms/eglconvenience/qxlibeglintegration.cpp
+++ b/src/plugins/platforms/eglconvenience/qxlibeglintegration.cpp
@@ -52,13 +52,11 @@ static int countBits(unsigned long mask)
return count;
}
-VisualID QXlibEglIntegration::getCompatibleVisualId(Display *display, EGLConfig config)
+VisualID QXlibEglIntegration::getCompatibleVisualId(Display *display, EGLDisplay eglDisplay, EGLConfig config)
{
VisualID visualId = 0;
EGLint eglValue = 0;
- EGLDisplay eglDisplay = eglGetDisplay(display);
-
EGLint configRedSize = 0;
eglGetConfigAttrib(eglDisplay, config, EGL_RED_SIZE, &configRedSize);
diff --git a/src/plugins/platforms/eglconvenience/qxlibeglintegration.h b/src/plugins/platforms/eglconvenience/qxlibeglintegration.h
index 51996da..6c2e266 100644
--- a/src/plugins/platforms/eglconvenience/qxlibeglintegration.h
+++ b/src/plugins/platforms/eglconvenience/qxlibeglintegration.h
@@ -47,7 +47,7 @@
class QXlibEglIntegration
{
public:
- static VisualID getCompatibleVisualId(Display *display, EGLConfig config);
+ static VisualID getCompatibleVisualId(Display *display, EGLDisplay eglDisplay, EGLConfig config);
};
#endif // QTESTLITEEGLINTEGRATION_H