qglxconvenience.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/glxconvenience/qglxconvenience.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the plugins of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40// We have to include this before the X11 headers dragged in by-
41// qglxconvenience_p.h.-
42#include <QtCore/QByteArray>-
43#include <QtCore/QScopedPointer>-
44-
45#include "qglxconvenience_p.h"-
46-
47#include <QtCore/QVector>-
48#include <QtCore/QVarLengthArray>-
49-
50#ifndef QT_NO_XRENDER-
51#include <X11/extensions/Xrender.h>-
52#endif-
53-
54#include <GL/glxext.h>-
55-
56enum {-
57 XFocusOut = FocusOut,-
58 XFocusIn = FocusIn,-
59 XKeyPress = KeyPress,-
60 XKeyRelease = KeyRelease,-
61 XNone = None,-
62 XRevertToParent = RevertToParent,-
63 XGrayScale = GrayScale,-
64 XCursorShape = CursorShape-
65};-
66#undef FocusOut-
67#undef FocusIn-
68#undef KeyPress-
69#undef KeyRelease-
70#undef None-
71#undef RevertToParent-
72#undef GrayScale-
73#undef CursorShape-
74-
75#ifdef FontChange-
76#undef FontChange-
77#endif-
78-
79QVector<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit)-
80{-
81 QVector<int> spec(48);-
int i = 0;
82-
83 spec [i++] =<< GLX_LEVEL-
84 ;-
spec[i++] =<< 0
85-
86 ;-
spec[i++] = GLX_DRAWABLE_TYPE; spec[i++] = drawableBit;
spec[i++] =<< GLX_RENDER_TYPE
87 ; spec[i++] =<< GLX_RGBA_BIT-
88-
89 ;-
spec[i++] =<< GLX_RED_SIZE
90 ; spec[i++] =<< qMax(format.redBufferSize() == -1) ?1:, format.redBufferSize();-
spec[i++] =())
91-
92 << GLX_GREEN_SIZE-
93 ; spec[i++] =<< qMax(format.greenBufferSize() == -1) ?1:, format.greenBufferSize();-
spec[i++] =())
94-
95 << GLX_BLUE_SIZE-
96 ; spec[i++] =<< qMax(format.blueBufferSize() == -1) ?1:, format.blueBufferSize();-
if (format.hasAlpha())
97-
98 {-
spec[i++] =<< GLX_ALPHA_SIZE
99 ; spec[i++] =<< qMax(0, format.alphaBufferSize();-
}
spec[i++] = GLX_DOUBLEBUFFER; spec[i++] =());
100-
101 if (
format.swapBeh...::SingleBufferDescription
TRUEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
format.swapBehavior() != QSurfaceFormat::SingleBuffer? True : False;)
format.swapBeh...::SingleBufferDescription
TRUEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
0-4057
102 spec [i++] = GLX_STEREO<< GLX_DOUBLEBUFFER
executed 4057 times by 120 tests: spec << 5 << 1;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
4057
103 << True
executed 4057 times by 120 tests: spec << 5 << 1;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
;
executed 4057 times by 120 tests: spec << 5 << 1;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
4057
104-
105 spec[i++] =if (format.stereo() ?())
format.stereo()Description
TRUEnever evaluated
FALSEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
0-4057
106 spec << GLX_STEREO
never executed: spec << 6 << 1;
0
107 <<
never executed: spec << 6 << 1;
True: False;
never executed: spec << 6 << 1;
0
108-
109 if (format.depthBufferSize() > 0!= -1)
format.depthBufferSize() != -1Description
TRUEevaluated 64 times by 7 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
FALSEevaluated 3993 times by 118 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
64-3993
110 {spec [i++] =<< GLX_DEPTH_SIZE
executed 64 times by 7 tests: spec << 12 << format.depthBufferSize();
Executed by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
64
111 ; spec[i++] =<< format.depthBufferSize();
executed 64 times by 7 tests: spec << 12 << format.depthBufferSize();
Executed by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
64
112-
113 }if (format.stencilBufferSize() > 0) {
format.stencil...erSize() != -1Description
TRUEevaluated 64 times by 7 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
FALSEevaluated 3993 times by 118 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
64-3993
spec[i++] = GLX_STENCIL_SIZE; spec[i++] =
format.stencil...erSize() != -1Description
TRUEevaluated 64 times by 7 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
FALSEevaluated 3993 times by 118 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
(format.stencilBufferSize() ==!= -1)
format.stencil...erSize() != -1Description
TRUEevaluated 64 times by 7 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
FALSEevaluated 3993 times by 118 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
114 ? 1 :spec << GLX_STENCIL_SIZE
executed 64 times by 7 tests: spec << 13 << format.stencilBufferSize();
Executed by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
64
115 <<
executed 64 times by 7 tests: spec << 13 << format.stencilBufferSize();
Executed by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
format.stencilBufferSize();
executed 64 times by 7 tests: spec << 13 << format.stencilBufferSize();
Executed by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsView
  • tst_QMdiArea
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
64
116-
117 }if (format.samples() > 1)
format.samples() > 1Description
TRUEnever evaluated
FALSEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
0-4057
118 {spec [i++] =<< GLX_SAMPLE_BUFFERS_ARB
never executed: spec << 100000 << 1 << 100001 << format.samples();
0
119 ;
never executed: spec << 100000 << 1 << 100001 << format.samples();
0
spec[i++] =
never executed: spec << 100000 << 1 << 100001 << format.samples();
<< 1
never executed: spec << 100000 << 1 << 100001 << format.samples();
120 ;
never executed: spec << 100000 << 1 << 100001 << format.samples();
0
spec[i++] =
never executed: spec << 100000 << 1 << 100001 << format.samples();
<< GLX_SAMPLES_ARB
never executed: spec << 100000 << 1 << 100001 << format.samples();
121 ;
never executed: spec << 100000 << 1 << 100001 << format.samples();
0
spec[i++] =
never executed: spec << 100000 << 1 << 100001 << format.samples();
<< format.samples();
never executed: spec << 100000 << 1 << 100001 << format.samples();
122-
123 }spec [i++] =<< GLX_DRAWABLE_TYPE-
124 << drawableBit-
125-
126 << XNone;-
127-
128 return spec;
executed 4057 times by 120 tests: return spec;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
4057
129}-
130-
GLXFBConfig qglx_findConfig(Display *display, int screen , const QSurfaceFormat &format, int drawableBit)namespace {
132struct QXcbSoftwareOpenGLEnforcer {-
133 QXcbSoftwareOpenGLEnforcer() {-
134 // Allow forcing LIBGL_ALWAYS_SOFTWARE for Qt 5 applications only.-
135 // This is most useful with drivers that only support OpenGL 1.-
136 // We need OpenGL 2, but the user probably doesn't want-
137 // LIBGL_ALWAYS_SOFTWARE in OpenGL 1 apps.-
138-
139 static bool checkedForceSoftwareOpenGL = false;
!checkedForceSoftwareOpenGLDescription
TRUEevaluated 124 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEevaluated 3933 times by 105 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
124-3933
static bool forceSoftwareOpenGL = false;
!checkedForceSoftwareOpenGLDescription
TRUEevaluated 124 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEevaluated 3933 times by 105 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
if (!checkedForceSoftwareOpenGL) {
!checkedForceSoftwareOpenGLDescription
TRUEevaluated 124 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEevaluated 3933 times by 105 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
140 // If LIBGL_ALWAYS_SOFTWARE is already set, don't mess with it.-
141 // We want to unset LIBGL_ALWAYS_SOFTWARE at the end so it does not-
142 // get inherited by other processes, of course only if it wasn't-
143 // already set before.-
144 if (!qEnvironmentVariableIsEmpty("QT_XCB_FORCE_SOFTWARE_OPENGL")
!qEnvironmentV...TWARE_OPENGL")Description
TRUEnever evaluated
FALSEevaluated 124 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
0-124
145 && !qEnvironmentVariableIsSet("LIBGL_ALWAYS_SOFTWARE"))
!qEnvironmentV...AYS_SOFTWARE")Description
TRUEnever evaluated
FALSEnever evaluated
0
146 forceSoftwareOpenGL = true;
never executed: forceSoftwareOpenGL = true;
0
147-
148 checkedForceSoftwareOpenGL = true;-
149 }
executed 124 times by 120 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
124
150-
151 if (forceSoftwareOpenGL)
forceSoftwareOpenGLDescription
TRUEnever evaluated
FALSEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
0-4057
152 qputenv("LIBGL_ALWAYS_SOFTWARE", QByteArrayLiteral("1"));
never executed: qputenv("LIBGL_ALWAYS_SOFTWARE", ([]() -> QByteArray { enum { Size = sizeof("1") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "1" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()));
never executed: return ba;
0
153 }
executed 4057 times by 120 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
4057
154-
155 ~QXcbSoftwareOpenGLEnforcer() {-
156 // unset LIBGL_ALWAYS_SOFTWARE now so other processes don't inherit it-
157
forceSoftwareOpenGLDescription
TRUEnever evaluated
FALSEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
if (forceSoftwareOpenGL)
forceSoftwareOpenGLDescription
TRUEnever evaluated
FALSEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
0-4057
158 qunsetenv("LIBGL_ALWAYS_SOFTWARE");
never executed: qunsetenv("LIBGL_ALWAYS_SOFTWARE");
0
159 }
executed 4057 times by 120 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
4057
160-
161 static bool reducedcheckedForceSoftwareOpenGL;-
162 static bool forceSoftwareOpenGL;-
163};-
164-
165bool QXcbSoftwareOpenGLEnforcer::checkedForceSoftwareOpenGL = truefalse;-
GLXFBConfig chosenConfigbool QXcbSoftwareOpenGLEnforcer::forceSoftwareOpenGL = 0false;
167-
QSurfaceFormat reducedFormattemplate <class T>
169struct QXlibScopedPointerDeleter {-
170 static inline void cleanup(T *pointer) {-
171 XFree(pointer);-
172 }
executed 8166 times by 120 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
8166
173};-
174-
175template <class T>-
176using QXlibPointer = QScopedPointer<T, QXlibScopedPointerDeleter<T>>;-
177-
178template <class T>-
179using QXlibArrayPointer = QScopedArrayPointer<T, QXlibScopedPointerDeleter<T>>;-
180}-
181-
182GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format;-
while (!chosenConfig && reduced, bool highestPixelFormat, int drawableBit)
183{-
184 QXcbSoftwareOpenGLEnforcer softwareOpenGLEnforcer;-
185-
186 GLXFBConfig config = 0;-
187-
188 do {-
189 const QVector<int> spec = qglx_buildSpec(reducedFormatformat, drawableBit);-
190-
191 int confcount = 0;-
192 QXlibArrayPointer<GLXFBConfig*configs;> configs=(glXChooseFBConfig(display, screen, spec.constData(), &confcount);));-
193-
194 if ((!config && confcount > 0) {
!configDescription
TRUEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
confcount > 0Description
TRUEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
0-4057
195 config = configs[0];-
196 if (highestPixelFormat && !format.hasAlpha())
highestPixelFormatDescription
TRUEnever evaluated
FALSEevaluated 4057 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
!format.hasAlpha()Description
TRUEnever evaluated
FALSEnever evaluated
0-4057
197 break;
never executed: break;
0
198 }
executed 4057 times by 120 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
4057
199-
200 const int requestedRed = qMax(0, format.redBufferSize());-
201 const int requestedGreen = qMax(0, format.greenBufferSize());-
202 const int requestedBlue = qMax(0, format.blueBufferSize());-
203 const int requestedAlpha = qMax(0, format.alphaBufferSize());-
204-
205 for (int i = 0; i < confcount; i++) {
i < confcountDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
0-4109
206 chosenConfigGLXFBConfig candidate = configs[i];-
207-
208 if (reducedFormat.hasAlpha()) {-
int alphaSize;
glXGetFBConfigAttrib(display,configs[i],GLX_ALPHA_SIZE,&alphaSize);
if (alphaSize > 0) {QXlibPointer<XVisualInfo*> visual=(glXGetVisualFromFBConfig(display, chosenConfig);
bool hasAlphacandidate));
209-
210 const int actualRed = false;-
#if !definedqPopulationCount(QT_NO_XRENDER)
XRenderPictFormat *pictFormatvisual->red_mask);
211 const int actualGreen = XRenderFindVisualFormatqPopulationCount(display,visual->visualgreen_mask);-
212 hasAlphaconst int actualBlue = pictFormatqPopulationCount(visual->direct.alphaMask > 0;-
#else
hasAlphablue_mask);
213 const int actualAlpha = visual->depth == 32- actualRed - actualGreen - actualBlue;-
214-
215 #endif
requestedRedDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualRed != requestedRedDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
0-4109
XFree(visual);
requestedRedDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualRed != requestedRedDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
if (hasAlpharequestedRed && actualRed != requestedRed)
requestedRedDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualRed != requestedRedDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
216 break;
never executed: continue;
0
}
never executed: continue;
} else {
never executed: continue;
break
never executed: continue;
continue;
never executed: continue;
217 }
requestedGreenDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualGreen != requestedGreenDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
0-4109
}
requestedGreenDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualGreen != requestedGreenDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
XFree(configs);
requestedGreenDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualGreen != requestedGreenDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
}
requestedGreenDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualGreen != requestedGreenDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
if (!chosenConfig(requestedGreen && actualGreen != requestedGreen)
requestedGreenDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualGreen != requestedGreenDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
218 reducedFormat = qglx_reduceSurfaceFormatcontinue;
never executed: continue;
0
219 if
requestedBlueDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualBlue != requestedBlueDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
(reducedFormat,&reduced);
requestedBlueDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualBlue != requestedBlueDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
0-4109
}
requestedBlueDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualBlue != requestedBlueDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
requestedBlueDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualBlue != requestedBlueDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
requestedBlue && actualBlue != requestedBlue)
requestedBlueDescription
TRUEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
actualBlue != requestedBlueDescription
TRUEnever evaluated
FALSEevaluated 4109 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
220 continue;
never executed: continue;
0
221 if (forceSoftwareOpenGLrequestedAlpha && actualAlpha != requestedAlpha)
requestedAlphaDescription
TRUEevaluated 56 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEevaluated 4053 times by 120 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
actualAlpha != requestedAlphaDescription
TRUEevaluated 52 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
4-4053
222 qunsetenvcontinue;
executed 52 times by 2 tests: continue;
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
52
223-
224 return candidate;
executed 4057 times by 120 tests: return candidate;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
4057
225 }-
226 } while
never executed: end of block
qglx_reduceFormat(&format)Description
TRUEnever evaluated
FALSEnever evaluated
("LIBGL_ALWAYS_SOFTWARE");qglx_reduceFormat(&format));
never executed: end of block
qglx_reduceFormat(&format)Description
TRUEnever evaluated
FALSEnever evaluated
0
227-
228 return chosenConfigconfig;
never executed: return config;
0
229}-
230-
231XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *format, int drawableBit)-
232{-
233 Q_ASSERT(format);-
234-
235 XVisualInfo *visualInfo = 0;-
236-
237 GLXFBConfig config = qglx_findConfig(display, screen,*, *format, false, drawableBit);-
238 if (config)
configDescription
TRUEevaluated 3974 times by 118 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
0-3974
239 {visualInfo = glXGetVisualFromFBConfig(display, config);
executed 3974 times by 118 tests: visualInfo = glXGetVisualFromFBConfig(display, config);
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
3974
240-
241 if (visualInfo) {
visualInfoDescription
TRUEevaluated 3974 times by 118 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
FALSEnever evaluated
0-3974
242 qglx_surfaceFormatFromGLXFBConfig(format, display, config);-
243 return visualInfo;
executed 3974 times by 118 tests: return visualInfo;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • tst_QDialogButtonBox
  • ...
3974
244 }-
245-
246 // attempt to fall back to glXChooseVisual-
247 bool reduced = true;-
QSurfaceFormat reducedFormat = *format;
while (!visualInfo && reduced)do {
248 QVarLengthArrayQVector<int, 13> attribs;-
attribs.append(GLX_RGBA);
if (reducedFormat.redBufferSize() > 0) {
attribs.append(GLX_RED_SIZE);
attribs.append(reducedFormat.redBufferSize());
}
if (reducedFormat.greenBufferSize() > 0) {
attribs.append(GLX_GREEN_SIZE);
attribs.append(reducedFormat.greenBufferSize());
}
if (reducedFormat.blueBufferSize() > 0) {
attribs.append(GLX_BLUE_SIZE);
attribs.append(reducedFormat.blueBufferSize());
}
if (reducedFormat.stencilBufferSize() > 0) {
attribs.append(GLX_STENCIL_SIZE);
attribs.append(reducedFormat.stencilBufferSize());
}
if (reducedFormat.depthBufferSize()> 0) {
attribs.append(GLX_DEPTH_SIZE);
attribs.append(reducedFormat.depthBufferSize());
}
if (reducedFormat.swapBehavior() != QSurfaceFormat::SingleBuffer)
attribs.append(GLX_DOUBLEBUFFER);attribs .append(XNone= qglx_buildSpec(*format, drawableBit);
249 visualInfo = glXChooseVisual(display, screen, attribs.data());-
250-
251 if (visualInfo) *format = reducedFormat;
visualInfoDescription
TRUEnever evaluated
FALSEnever evaluated
0
reducedFormat = qglx_reduceSurfaceFormat
visualInfoDescription
TRUEnever evaluated
FALSEnever evaluated
{
visualInfoDescription
TRUEnever evaluated
FALSEnever evaluated
252 qglx_surfaceFormatFromVisualInfo(reducedFormatformat, &reduceddisplay, visualInfo);-
253 return visualInfo;
never executed: return visualInfo;
0
254 }-
255 } while (qglx_reduceFormat(format));
never executed: end of block
qglx_reduceFormat(format)Description
TRUEnever evaluated
FALSEnever evaluated
0
256-
257 return visualInfo;
never executed: return visualInfo;
0
258}-
259-
260void qglx_surfaceFormatFromGLXFBConfig(QSurfaceFormat *format, Display *display, GLXFBConfig config)-
261{-
262 int redSize = 0;-
263 int greenSize = 0;-
264 int blueSize = 0;-
265 int alphaSize = 0;-
266 int depthSize = 0;-
267 int stencilSize = 0;-
268 int sampleBuffers = 0;-
269 int sampleCount = 0;-
270 int stereo = 0;-
271-
272 glXGetFBConfigAttrib(display, config, GLX_RED_SIZE, &redSize);-
273 glXGetFBConfigAttrib(display, config, GLX_GREEN_SIZE, &greenSize);-
274 glXGetFBConfigAttrib(display, config, GLX_BLUE_SIZE, &blueSize);-
275 glXGetFBConfigAttrib(display, config, GLX_ALPHA_SIZE, &alphaSize);-
276 glXGetFBConfigAttrib(display, config, GLX_DEPTH_SIZE, &depthSize);-
277 glXGetFBConfigAttrib(display, config, GLX_STENCIL_SIZE, &stencilSize);-
278 glXGetFBConfigAttrib(display, config, GLX_SAMPLES_ARB, &sampleBuffers);-
279 glXGetFBConfigAttrib(display, config, GLX_STEREO, &stereo);-
280-
281 format->setRedBufferSize(redSize);-
282 format->setGreenBufferSize(greenSize);-
283 format->setBlueBufferSize(blueSize);-
284 format->setAlphaBufferSize(alphaSize);-
285 format->setDepthBufferSize(depthSize);-
286 format->setStencilBufferSize(stencilSize);-
287 if (sampleBuffers) {-
288 glXGetFBConfigAttrib(display, config, GLX_SAMPLES_ARB, &sampleCount);-
289 format->setSamples(sampleCount);-
290 }-
291-
292 format->setStereo(stereo);-
293}-
294-
295void qglx_surfaceFormatFromVisualInfo(QSurfaceFormat *format, Display *display, XVisualInfo *visualInfo)-
296{-
297 int redSize = 0;-
298 int greenSize = 0;-
299 int blueSize = 0;-
300 int alphaSize = 0;-
301 int depthSize = 0;-
302 int stencilSize = 0;-
303 int sampleBuffers = 0;-
304 int sampleCount = 0;-
305 int stereo = 0;-
306-
307 glXGetConfig(display, visualInfo, GLX_RED_SIZE, &redSize);-
308 glXGetConfig(display, visualInfo, GLX_GREEN_SIZE, &greenSize);-
309 glXGetConfig(display, visualInfo, GLX_BLUE_SIZE, &blueSize);-
310 glXGetConfig(display, visualInfo, GLX_ALPHA_SIZE, &alphaSize);-
311 glXGetConfig(display, visualInfo, GLX_DEPTH_SIZE, &depthSize);-
312 glXGetConfig(display, visualInfo, GLX_STENCIL_SIZE, &stencilSize);-
313 glXGetConfig(display, visualInfo, GLX_SAMPLES_ARB, &sampleBuffers);-
314 glXGetConfig(display, visualInfo, GLX_STEREO, &stereo);-
315-
316 format->setRedBufferSize(redSize);-
317 format->setGreenBufferSize(greenSize);-
318 format->setBlueBufferSize(blueSize);-
319 format->setAlphaBufferSize(alphaSize);-
320 format->setDepthBufferSize(depthSize);-
321 format->setStencilBufferSize(stencilSize);-
322 if (sampleBuffers) {-
323 glXGetConfig(display, visualInfo, GLX_SAMPLES_ARB, &sampleCount);-
324 format->setSamples(sampleCount);-
325 }-
326-
327 format->setStereo(stereo);-
328}-
329-
QSurfaceFormat qglx_reduceSurfaceFormatbool qglx_reduceFormat(constQSurfaceFormat &format, bool*reducedformat)
331{-
332 QSurfaceFormat retFormat =Q_ASSERT(format;-
*reduced = true;);
333-
334 if (retFormat.format->redBufferSize() > 1) {
format->redBufferSize() > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
335 retFormat.format->setRedBufferSize(1);-
336 return true;
never executed: return true;
0
337 }-
338-
339 elseif (retFormat.format->greenBufferSize() > 1) {
format->greenBufferSize() > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
340 retFormat.format->setGreenBufferSize(1);-
341 return true;
never executed: return true;
0
342 }-
343-
344 elseif (retFormat.format->blueBufferSize() > 1) {
format->blueBufferSize() > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
345 retFormat.format->setBlueBufferSize(1);-
346 return true;
never executed: return true;
0
347 }-
348-
349 elseif (retFormat.format->swapBehavior() != QSurfaceFormat::SingleBuffer){
format->swapBe...::SingleBufferDescription
TRUEnever evaluated
FALSEnever evaluated
0
350 format->setSwapBehavior(QSurfaceFormat::SingleBuffer);-
351 return true;
never executed: return true;
0
352 }-
353-
354 if (format->
format->samples() > 1Description
TRUEnever evaluated
FALSEnever evaluated
samples() > 1) {
format->samples() > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
355 retFormat.format->setSamples(qMin(retFormat.16, format->samples() / 2, 16));-
356 return true;
never executed: return true;
0
357 }-
358-
359 elseif (retFormat.stereo())format->depthBufferSize() >= 32) {
format->depthB...erSize() >= 32Description
TRUEnever evaluated
FALSEnever evaluated
0
360 retFormat.setStereoformat->setDepthBufferSize(false24);-
361 return true;
never executed: return true;
0
362 }-
363-
364 elseif (retFormat.stencilBufferSizeformat->depthBufferSize() > 1) {
format->depthBufferSize() > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
365 format->setDepthBufferSize(1);-
366 return true;
never executed: return true;
0
367 }-
368-
369 if (format->depthBufferSize
format->depthBufferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
() > 0) {
format->depthBufferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
370 retFormat.setStencilBufferSizeformat->setDepthBufferSize(0);-
371 return true;
never executed: return true;
0
372 }-
373-
374 elseif (retFormat.format->hasAlpha()) {
format->hasAlpha()Description
TRUEnever evaluated
FALSEnever evaluated
0
375 retFormat.format->setAlphaBufferSize(0);-
376 return true;
never executed: return true;
0
377 }-
378-
379 elseif (retFormat.depthBufferSizeformat->stencilBufferSize() > 01) {
format->stenci...fferSize() > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
380 retFormat.setDepthBufferSizeformat->setStencilBufferSize(01);-
381 return true;
never executed: return true;
0
382 }-
383-
384 elseif (retFormat.swapBehaviorformat->stencilBufferSize() != QSurfaceFormat::SingleBuffer> 0) {
format->stenci...fferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
385 retFormat.setSwapBehaviorformat->setStencilBufferSize(QSurfaceFormat::SingleBuffer0);-
386 return true;
never executed: return true;
0
387 }-
388-
389 elseif (format->stereo()) {
format->stereo()Description
TRUEnever evaluated
FALSEnever evaluated
0
390 *reduced =format->setStereo(false);-
391 return true
never executed: return true;
;
never executed: return true;
0
392 }-
393-
394 return retFormatfalse;
never executed: return false;
0
395}-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9