summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-12-04 18:42:07 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-12-04 19:51:29 (GMT)
commit92e9fcc25c62870c383c8558d576abc509a8c683 (patch)
tree668092f0cd92cefe2588f2f53c5d5f1dfb0c7600
parent8529a8cbb0c6404c758b5efc650186d740b0e09f (diff)
downloadQt-92e9fcc25c62870c383c8558d576abc509a8c683.zip
Qt-92e9fcc25c62870c383c8558d576abc509a8c683.tar.gz
Qt-92e9fcc25c62870c383c8558d576abc509a8c683.tar.bz2
Add EGL_BUFFER_SIZE to QEglProperties::reduceConfiguration()
Reviewed-by: Trustme
-rw-r--r--src/gui/egl/qeglproperties.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index 2d37edb..4d4410a 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -229,6 +229,15 @@ void QEglProperties::setRenderableType(QEgl::API api)
// reductions in complexity are possible.
bool QEglProperties::reduceConfiguration()
{
+ // EGL chooses configs with the highest color depth over
+ // those with smaller (but faster) lower color depths. One
+ // way around this is to set EGL_BUFFER_SIZE to 16, which
+ // trumps the others. Of course, there may not be a 16-bit
+ // config avaliable, so it's the first restraint we remove.
+ if (value(EGL_BUFFER_SIZE) == 16) {
+ removeValue(EGL_BUFFER_SIZE);
+ return true;
+ }
if (removeValue(EGL_SAMPLE_BUFFERS)) {
removeValue(EGL_SAMPLES);
return true;