qglxconvenience.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/glxconvenience/qglxconvenience.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9enum {-
10 XFocusOut = 10,-
11 XFocusIn = 9,-
12 XKeyPress = 2,-
13 XKeyRelease = 3,-
14 XNone = 0L,-
15 XRevertToParent = 2,-
16 XGrayScale = 1,-
17 XCursorShape = 0-
18};-
19QVector<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit)-
20{-
21 QVector<int> spec(48);-
22 int i = 0;-
23-
24 spec[i++] = 3;-
25 spec[i++] = 0;-
26 spec[i++] = 0x8010; spec[i++] = drawableBit;-
27-
28 spec[i++] = 0x8011; spec[i++] = 0x00000001;-
29-
30 spec[i++] = 8; spec[i++] = (
(format.redBufferSize() == -1)Description
TRUEevaluated 4102 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 40 times by 4 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
format.redBufferSize() == -1)
(format.redBufferSize() == -1)Description
TRUEevaluated 4102 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 40 times by 4 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
? 1 : format.redBufferSize();
40-4102
31 spec[i++] = 9; spec[i++] = (
(format.greenB...rSize() == -1)Description
TRUEevaluated 4102 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 40 times by 4 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
format.greenBufferSize() == -1)
(format.greenB...rSize() == -1)Description
TRUEevaluated 4102 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 40 times by 4 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
? 1 : format.greenBufferSize();
40-4102
32 spec[i++] = 10; spec[i++] = (
(format.blueBu...rSize() == -1)Description
TRUEevaluated 4102 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 40 times by 4 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
format.blueBufferSize() == -1)
(format.blueBu...rSize() == -1)Description
TRUEevaluated 4102 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 40 times by 4 tests
Evaluated by:
  • tst_QGraphicsView
  • tst_QOpenGLWidget
  • tst_QOpenGLWindow
  • tst_QOpenGlConfig
? 1 : format.blueBufferSize();
40-4102
33 if (format.hasAlpha()
format.hasAlpha()Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEevaluated 4138 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
  • ...
) {
4-4138
34 spec[i++] = 11; spec[i++] = format.alphaBufferSize();-
35 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
4
36-
37 spec[i++] = 5; spec[i++] = format.swapBehavior() != QSurfaceFormat::SingleBuffer
format.swapBeh...::SingleBufferDescription
TRUEevaluated 4142 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
? 1 : 0;
0-4142
38-
39 spec[i++] = 6; spec[i++] = format.stereo()
format.stereo()Description
TRUEnever evaluated
FALSEevaluated 4142 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
  • ...
? 1 : 0;
0-4142
40-
41 if (format.depthBufferSize() > 0
format.depthBufferSize() > 0Description
TRUEevaluated 24 times by 3 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QMdiArea
FALSEevaluated 4118 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
  • ...
) {
24-4118
42 spec[i++] = 12; spec[i++] = format.depthBufferSize();-
43 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QMdiArea
24
44-
45 if (format.stencilBufferSize() > 0
format.stencilBufferSize() > 0Description
TRUEevaluated 24 times by 3 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QMdiArea
FALSEevaluated 4118 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
  • ...
) {
24-4118
46 spec[i++] = 13; spec[i++] = (
(format.stenci...rSize() == -1)Description
TRUEnever evaluated
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QMdiArea
format.stencilBufferSize() == -1)
(format.stenci...rSize() == -1)Description
TRUEnever evaluated
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QMdiArea
? 1 : format.stencilBufferSize();
0-24
47 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QMdiArea
24
48-
49 if (format.samples() > 1
format.samples() > 1Description
TRUEnever evaluated
FALSEevaluated 4142 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-4142
50 spec[i++] = 100000;-
51 spec[i++] = 1;-
52 spec[i++] = 100001;-
53 spec[i++] = format.samples();-
54 }
never executed: end of block
0
55-
56 spec[i++] = XNone;-
57 return
executed 4142 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
  • ...
spec;
executed 4142 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
  • ...
4142
58}-
59-
60GLXFBConfig qglx_findConfig(Display *display, int screen , const QSurfaceFormat &format, int drawableBit)-
61{-
62-
63-
64-
65-
66 static bool checkedForceSoftwareOpenGL = false;-
67 static bool forceSoftwareOpenGL = false;-
68 if (!checkedForceSoftwareOpenGL
!checkedForceSoftwareOpenGLDescription
TRUEevaluated 122 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 4020 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
  • ...
) {
122-4020
69-
70-
71-
72-
73 if (!qEnvironmentVariableIsEmpty("QT_XCB_FORCE_SOFTWARE_OPENGL")
!qEnvironmentV...TWARE_OPENGL")Description
TRUEnever evaluated
FALSEevaluated 122 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-122
74 && !qEnvironmentVariableIsSet("LIBGL_ALWAYS_SOFTWARE")
!qEnvironmentV...AYS_SOFTWARE")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
75 forceSoftwareOpenGL = true;
never executed: forceSoftwareOpenGL = true;
0
76-
77 checkedForceSoftwareOpenGL = true;-
78 }
executed 122 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
  • ...
122
79-
80 if (forceSoftwareOpenGL
forceSoftwareOpenGLDescription
TRUEnever evaluated
FALSEevaluated 4142 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-4142
81 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
never executed: return ba;
ba;
never executed: return ba;
}()));
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; }()));
0
82-
83 bool reduced = true;-
84 GLXFBConfig chosenConfig = 0;-
85 QSurfaceFormat reducedFormat = format;-
86 while (!chosenConfig
!chosenConfigDescription
TRUEevaluated 4142 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 4142 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
  • ...
&& reduced
reducedDescription
TRUEevaluated 4142 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-4142
87 QVector<int> spec = qglx_buildSpec(reducedFormat, drawableBit);-
88 int confcount = 0;-
89 GLXFBConfig *configs;-
90 configs = glXChooseFBConfig(display, screen,spec.constData(),&confcount);-
91 if (confcount
confcountDescription
TRUEevaluated 4142 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-4142
92 {-
93 for (int i = 0; i < confcount
i < confcountDescription
TRUEevaluated 4194 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
; i++) {
0-4194
94 chosenConfig = configs[i];-
95-
96 if (reducedFormat.hasAlpha()
reducedFormat.hasAlpha()Description
TRUEevaluated 56 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEevaluated 4138 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
  • ...
) {
56-4138
97 int alphaSize;-
98 glXGetFBConfigAttrib(display,configs[i],11,&alphaSize);-
99 if (alphaSize > 0
alphaSize > 0Description
TRUEevaluated 56 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEnever evaluated
) {
0-56
100 XVisualInfo *visual = glXGetVisualFromFBConfig(display, chosenConfig);-
101 bool hasAlpha = false;-
102-
103-
104 XRenderPictFormat *pictFormat = XRenderFindVisualFormat(display, visual->visual);-
105 hasAlpha = pictFormat->direct.alphaMask > 0;-
106-
107-
108-
109-
110 XFree(visual);-
111-
112 if (hasAlpha
hasAlphaDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_QWidget
)
4-52
113 break;
executed 4 times by 2 tests: break;
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
4
114 }
executed 52 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
52
115 }
executed 52 times by 2 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_QWidget
else {
52
116 break;
executed 4138 times by 120 tests: break;
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
  • ...
4138
117 }-
118 }-
119-
120 XFree(configs);-
121 }
executed 4142 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
  • ...
4142
122 if (!chosenConfig
!chosenConfigDescription
TRUEnever evaluated
FALSEevaluated 4142 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-4142
123 reducedFormat = qglx_reduceSurfaceFormat(reducedFormat,&reduced);
never executed: reducedFormat = qglx_reduceSurfaceFormat(reducedFormat,&reduced);
0
124 }
executed 4142 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
  • ...
4142
125-
126-
127 if (forceSoftwareOpenGL
forceSoftwareOpenGLDescription
TRUEnever evaluated
FALSEevaluated 4142 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-4142
128 qunsetenv("LIBGL_ALWAYS_SOFTWARE");
never executed: qunsetenv("LIBGL_ALWAYS_SOFTWARE");
0
129-
130 return
executed 4142 times by 120 tests: return chosenConfig;
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
  • ...
chosenConfig;
executed 4142 times by 120 tests: return chosenConfig;
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
  • ...
4142
131}-
132-
133XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *format)-
134{-
135 ((!(format)) ? qt_assert("format",__FILE__,188) : qt_noop());-
136-
137 XVisualInfo *visualInfo = 0;-
138-
139 GLXFBConfig config = qglx_findConfig(display,screen,*format);-
140 if (config
configDescription
TRUEevaluated 4059 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-4059
141 visualInfo = glXGetVisualFromFBConfig(display, config);-
142 qglx_surfaceFormatFromGLXFBConfig(format, display, config);-
143 }
executed 4059 times by 118 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
  • ...
4059
144-
145-
146 bool reduced = true;-
147 QSurfaceFormat reducedFormat = *format;-
148 while (!visualInfo
!visualInfoDescription
TRUEnever evaluated
FALSEevaluated 4059 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
  • ...
&& reduced
reducedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-4059
149 QVarLengthArray<int, 13> attribs;-
150 attribs.append(4);-
151-
152 if (reducedFormat.redBufferSize() > 0
reducedFormat....fferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
153 attribs.append(8);-
154 attribs.append(reducedFormat.redBufferSize());-
155 }
never executed: end of block
0
156-
157 if (reducedFormat.greenBufferSize() > 0
reducedFormat....fferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
158 attribs.append(9);-
159 attribs.append(reducedFormat.greenBufferSize());-
160 }
never executed: end of block
0
161-
162 if (reducedFormat.blueBufferSize() > 0
reducedFormat....fferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
163 attribs.append(10);-
164 attribs.append(reducedFormat.blueBufferSize());-
165 }
never executed: end of block
0
166-
167 if (reducedFormat.stencilBufferSize() > 0
reducedFormat....fferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
168 attribs.append(13);-
169 attribs.append(reducedFormat.stencilBufferSize());-
170 }
never executed: end of block
0
171-
172 if (reducedFormat.depthBufferSize() > 0
reducedFormat....fferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
173 attribs.append(12);-
174 attribs.append(reducedFormat.depthBufferSize());-
175 }
never executed: end of block
0
176-
177 if (reducedFormat.swapBehavior() != QSurfaceFormat::SingleBuffer
reducedFormat....::SingleBufferDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
178 attribs.append(5);
never executed: attribs.append(5);
0
179-
180 attribs.append(XNone);-
181-
182 visualInfo = glXChooseVisual(display, screen, attribs.data());-
183 if (visualInfo
visualInfoDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
184 *
never executed: *format = reducedFormat;
format = reducedFormat;
never executed: *format = reducedFormat;
0
185-
186 reducedFormat = qglx_reduceSurfaceFormat(reducedFormat, &reduced);-
187 }
never executed: end of block
0
188-
189 return
executed 4059 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
  • ...
visualInfo;
executed 4059 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
  • ...
4059
190}-
191-
192void qglx_surfaceFormatFromGLXFBConfig(QSurfaceFormat *format, Display *display, GLXFBConfig config)-
193{-
194 int redSize = 0;-
195 int greenSize = 0;-
196 int blueSize = 0;-
197 int alphaSize = 0;-
198 int depthSize = 0;-
199 int stencilSize = 0;-
200 int sampleBuffers = 0;-
201 int sampleCount = 0;-
202 int stereo = 0;-
203-
204 glXGetFBConfigAttrib(display, config, 8, &redSize);-
205 glXGetFBConfigAttrib(display, config, 9, &greenSize);-
206 glXGetFBConfigAttrib(display, config, 10, &blueSize);-
207 glXGetFBConfigAttrib(display, config, 11, &alphaSize);-
208 glXGetFBConfigAttrib(display, config, 12, &depthSize);-
209 glXGetFBConfigAttrib(display, config, 13, &stencilSize);-
210 glXGetFBConfigAttrib(display, config, 100001, &sampleBuffers);-
211 glXGetFBConfigAttrib(display, config, 6, &stereo);-
212-
213 format->setRedBufferSize(redSize);-
214 format->setGreenBufferSize(greenSize);-
215 format->setBlueBufferSize(blueSize);-
216 format->setAlphaBufferSize(alphaSize);-
217 format->setDepthBufferSize(depthSize);-
218 format->setStencilBufferSize(stencilSize);-
219 if (sampleBuffers
sampleBuffersDescription
TRUEnever evaluated
FALSEevaluated 4142 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-4142
220 glXGetFBConfigAttrib(display, config, 100001, &sampleCount);-
221 format->setSamples(sampleCount);-
222 }
never executed: end of block
0
223-
224 format->setStereo(stereo);-
225}
executed 4142 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
  • ...
4142
226-
227void qglx_surfaceFormatFromVisualInfo(QSurfaceFormat *format, Display *display, XVisualInfo *visualInfo)-
228{-
229 int redSize = 0;-
230 int greenSize = 0;-
231 int blueSize = 0;-
232 int alphaSize = 0;-
233 int depthSize = 0;-
234 int stencilSize = 0;-
235 int sampleBuffers = 0;-
236 int sampleCount = 0;-
237 int stereo = 0;-
238-
239 glXGetConfig(display, visualInfo, 8, &redSize);-
240 glXGetConfig(display, visualInfo, 9, &greenSize);-
241 glXGetConfig(display, visualInfo, 10, &blueSize);-
242 glXGetConfig(display, visualInfo, 11, &alphaSize);-
243 glXGetConfig(display, visualInfo, 12, &depthSize);-
244 glXGetConfig(display, visualInfo, 13, &stencilSize);-
245 glXGetConfig(display, visualInfo, 100001, &sampleBuffers);-
246 glXGetConfig(display, visualInfo, 6, &stereo);-
247-
248 format->setRedBufferSize(redSize);-
249 format->setGreenBufferSize(greenSize);-
250 format->setBlueBufferSize(blueSize);-
251 format->setAlphaBufferSize(alphaSize);-
252 format->setDepthBufferSize(depthSize);-
253 format->setStencilBufferSize(stencilSize);-
254 if (sampleBuffers
sampleBuffersDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
255 glXGetConfig(display, visualInfo, 100001, &sampleCount);-
256 format->setSamples(sampleCount);-
257 }
never executed: end of block
0
258-
259 format->setStereo(stereo);-
260}
never executed: end of block
0
261-
262QSurfaceFormat qglx_reduceSurfaceFormat(const QSurfaceFormat &format, bool *reduced)-
263{-
264 QSurfaceFormat retFormat = format;-
265 *reduced = true;-
266-
267 if (retFormat.redBufferSize() > 1
retFormat.redBufferSize() > 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
268 retFormat.setRedBufferSize(1);-
269 }
never executed: end of block
else if (retFormat.greenBufferSize() > 1
retFormat.gree...fferSize() > 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
270 retFormat.setGreenBufferSize(1);-
271 }
never executed: end of block
else if (retFormat.blueBufferSize() > 1
retFormat.blueBufferSize() > 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
272 retFormat.setBlueBufferSize(1);-
273 }
never executed: end of block
else if (retFormat.samples() > 1
retFormat.samples() > 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
274 retFormat.setSamples(qMin(retFormat.samples() / 2, 16));-
275 }
never executed: end of block
else if (retFormat.stereo()
retFormat.stereo()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
276 retFormat.setStereo(false);-
277 }
never executed: end of block
else if (retFormat.stencilBufferSize() > 0
retFormat.sten...fferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
278 retFormat.setStencilBufferSize(0);-
279 }
never executed: end of block
else if (retFormat.hasAlpha()
retFormat.hasAlpha()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
280 retFormat.setAlphaBufferSize(0);-
281 }
never executed: end of block
else if (retFormat.depthBufferSize() > 0
retFormat.dept...fferSize() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
282 retFormat.setDepthBufferSize(0);-
283 }
never executed: end of block
else if (retFormat.swapBehavior() != QSurfaceFormat::SingleBuffer
retFormat.swap...::SingleBufferDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
284 retFormat.setSwapBehavior(QSurfaceFormat::SingleBuffer);-
285 }
never executed: end of block
else{
0
286 *reduced = false;-
287 }
never executed: end of block
0
288 return
never executed: return retFormat;
retFormat;
never executed: return retFormat;
0
289}-
Switch to Source codePreprocessed file

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