summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/egl/qeglproperties.cpp14
-rw-r--r--src/gui/egl/qeglproperties_p.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index 22b55feebc..7b582c43a3 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 4ef381496c..383a873008 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;
};