diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-08-06 13:26:21 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-08-21 10:55:19 (GMT) |
commit | 07b0bf308e65786c3d72de55b30590c3e8e3133c (patch) | |
tree | 22048f2251fd878a148e06ee02fdc73f48fe3a00 /src/gui/egl | |
parent | fb2296e84379b03176a52527ec956cd9b34dc058 (diff) | |
download | Qt-07b0bf308e65786c3d72de55b30590c3e8e3133c.zip Qt-07b0bf308e65786c3d72de55b30590c3e8e3133c.tar.gz Qt-07b0bf308e65786c3d72de55b30590c3e8e3133c.tar.bz2 |
Add a static QEglProperties::dumpAllConfigs()
This is private API
Reviewed-By: Trustme
Diffstat (limited to 'src/gui/egl')
-rw-r--r-- | src/gui/egl/qeglproperties.cpp | 14 | ||||
-rw-r--r-- | src/gui/egl/qeglproperties_p.h | 2 |
2 files changed, 16 insertions, 0 deletions
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; }; |