diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-05 14:22:45 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-05 14:22:45 +0200 |
commit | f2856875843efce9a00e90dad05bde358ab82197 (patch) | |
tree | 93346c38504ce04f0bf02dfe4a21299feb1be8ed /src/platformsupport/glxconvenience/qglxconvenience.cpp | |
parent | a7b04275082d065f392e7f18c54ea9b41507ae40 (diff) | |
parent | a2970719c26c946fd6fea7d902aad6706a4ca6ea (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
examples/corelib/ipc/ipc.pro
src/plugins/platforms/xcb/qxcbbackingstore.cpp
tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
Diffstat (limited to 'src/platformsupport/glxconvenience/qglxconvenience.cpp')
-rw-r--r-- | src/platformsupport/glxconvenience/qglxconvenience.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp index 5fafdcf0c0..870e746a53 100644 --- a/src/platformsupport/glxconvenience/qglxconvenience.cpp +++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp @@ -323,7 +323,11 @@ QSurfaceFormat qglx_reduceSurfaceFormat(const QSurfaceFormat &format, bool *redu QSurfaceFormat retFormat = format; *reduced = true; - if (retFormat.redBufferSize() > 1) { + if (retFormat.depthBufferSize() >= 32) { + retFormat.setDepthBufferSize(24); + } else if (retFormat.depthBufferSize() > 0) { + retFormat.setDepthBufferSize(0); + } else if (retFormat.redBufferSize() > 1) { retFormat.setRedBufferSize(1); } else if (retFormat.greenBufferSize() > 1) { retFormat.setGreenBufferSize(1); @@ -337,8 +341,6 @@ QSurfaceFormat qglx_reduceSurfaceFormat(const QSurfaceFormat &format, bool *redu retFormat.setStencilBufferSize(0); }else if (retFormat.hasAlpha()) { retFormat.setAlphaBufferSize(0); - }else if (retFormat.depthBufferSize() > 0) { - retFormat.setDepthBufferSize(0); }else if (retFormat.swapBehavior() != QSurfaceFormat::SingleBuffer) { retFormat.setSwapBehavior(QSurfaceFormat::SingleBuffer); }else{ |