summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp
index f9ccde6b52..4ba9c1f5ac 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience.cpp
+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp
@@ -152,13 +152,19 @@ bool q_reduceConfigAttributes(QVector<EGLint> *configAttributes)
}
}
+ i = configAttributes->indexOf(EGL_SAMPLES);
+ if (i >= 0) {
+ EGLint value = configAttributes->value(i+1, 0);
+ if (value > 1)
+ configAttributes->replace(i+1, qMin(EGLint(16), value / 2));
+ else
+ configAttributes->remove(i, 2);
+ return true;
+ }
+
i = configAttributes->indexOf(EGL_SAMPLE_BUFFERS);
if (i >= 0) {
configAttributes->remove(i,2);
- i = configAttributes->indexOf(EGL_SAMPLES);
- if (i >= 0) {
- configAttributes->remove(i,2);
- }
return true;
}