summaryrefslogtreecommitdiffstats
path: root/src/gui/egl
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-21 12:39:29 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-21 12:39:29 (GMT)
commite59ee48a8656d04339967ad99334bd0ddca0c956 (patch)
tree4fe72429115ae4a4171cd3f1f06d9a3a425973d0 /src/gui/egl
parent4aa6869877d4906fcfaac5388294748512cace25 (diff)
parent508b447075fb852e61ddf88c92c9099dad292747 (diff)
downloadQt-e59ee48a8656d04339967ad99334bd0ddca0c956.zip
Qt-e59ee48a8656d04339967ad99334bd0ddca0c956.tar.gz
Qt-e59ee48a8656d04339967ad99334bd0ddca0c956.tar.bz2
Merge commit 'qt/master'
Diffstat (limited to 'src/gui/egl')
-rw-r--r--src/gui/egl/qegl.cpp2
-rw-r--r--src/gui/egl/qegl_p.h4
-rw-r--r--src/gui/egl/qeglproperties.cpp14
-rw-r--r--src/gui/egl/qeglproperties_p.h2
4 files changed, 19 insertions, 3 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 9d0ead1..f0df0c9 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -402,7 +402,7 @@ void QEglContext::dumpAllConfigs()
QString QEglContext::extensions()
{
- const char* exts = eglQueryString(dpy, EGL_EXTENSIONS);
+ const char* exts = eglQueryString(QEglContext::defaultDisplay(0), EGL_EXTENSIONS);
return QString(QLatin1String(exts));
}
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h
index bba5e59..97730d8 100644
--- a/src/gui/egl/qegl_p.h
+++ b/src/gui/egl/qegl_p.h
@@ -122,8 +122,8 @@ public:
void dumpAllConfigs();
- QString extensions();
- bool hasExtension(const char* extensionName);
+ static QString extensions();
+ static bool hasExtension(const char* extensionName);
private:
QEgl::API apiType;
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index 22b55fe..7b582c4 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -257,6 +257,20 @@ static void addTag(QString& str, const QString& tag)
str += tag;
}
+void QEglProperties::dumpAllConfigs()
+{
+ EGLint count = 0;
+ eglGetConfigs(QEglContext::defaultDisplay(0), 0, 0, &count);
+ if (count < 1)
+ return;
+
+ EGLConfig *configs = new EGLConfig [count];
+ eglGetConfigs(QEglContext::defaultDisplay(0), configs, count, &count);
+ for (EGLint index = 0; index < count; ++index)
+ qWarning() << QEglProperties(configs[index]).toString();
+ delete [] configs;
+}
+
// Convert a property list to a string suitable for debug output.
QString QEglProperties::toString() const
{
diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h
index 4ef3814..383a873 100644
--- a/src/gui/egl/qeglproperties_p.h
+++ b/src/gui/egl/qeglproperties_p.h
@@ -130,6 +130,8 @@ public:
QString toString() const;
+ static void dumpAllConfigs();
+
private:
QVarLengthArray<int> props;
};