summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglconvenience/qeglconvenience.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/eglconvenience/qeglconvenience.cpp')
-rw-r--r--src/plugins/platforms/eglconvenience/qeglconvenience.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/platforms/eglconvenience/qeglconvenience.cpp b/src/plugins/platforms/eglconvenience/qeglconvenience.cpp
index 24c21e6..ec4577a 100644
--- a/src/plugins/platforms/eglconvenience/qeglconvenience.cpp
+++ b/src/plugins/platforms/eglconvenience/qeglconvenience.cpp
@@ -206,7 +206,7 @@ bool q_reduceConfigAttributes(QVector<EGLint> *configAttributes)
return false;
}
-EGLConfig q_configFromQPlatformWindowFormat(EGLDisplay display, const QPlatformWindowFormat &format)
+EGLConfig q_configFromQPlatformWindowFormat(EGLDisplay display, const QPlatformWindowFormat &format, bool highestPixelFormat)
{
EGLConfig cfg = 0;
QVector<EGLint> configureAttributes = q_createConfigAttributesFromFormat(format);
@@ -227,14 +227,14 @@ EGLConfig q_configFromQPlatformWindowFormat(EGLDisplay display, const QPlatformW
if (!eglChooseConfig(display, configureAttributes.constData(), 0, 0, &matching) || !matching)
continue;
-// // If we want the best pixel format, then return the first
-// // matching configuration.
-// if (match == QEgl::BestPixelFormat) {
-// eglChooseConfig(display, props.properties(), &cfg, 1, &matching);
-// if (matching < 1)
-// continue;
-// return cfg;
-// }
+ // If we want the best pixel format, then return the first
+ // matching configuration.
+ if (highestPixelFormat) {
+ eglChooseConfig(display, configureAttributes.constData(), &cfg, 1, &matching);
+ if (matching < 1)
+ continue;
+ return cfg;
+ }
// Fetch all of the matching configurations and find the
// first that matches the pixel format we wanted.