qplatformopenglcontext.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformopenglcontext.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4class QPlatformOpenGLContextPrivate-
5{-
6public:-
7 QPlatformOpenGLContextPrivate() : context(0) {}
never executed: end of block
0
8-
9 QOpenGLContext *context;-
10};-
11-
12QPlatformOpenGLContext::QPlatformOpenGLContext()-
13 : d_ptr(new QPlatformOpenGLContextPrivate)-
14{-
15}
never executed: end of block
0
16-
17QPlatformOpenGLContext::~QPlatformOpenGLContext()-
18{-
19}-
20-
21-
22-
23-
24-
25-
26-
27void QPlatformOpenGLContext::initialize()-
28{-
29}-
30-
31-
32-
33-
34-
35-
36GLuint QPlatformOpenGLContext::defaultFramebufferObject(QPlatformSurface *) const-
37{-
38 return
never executed: return 0;
0;
never executed: return 0;
0
39}-
40-
41QOpenGLContext *QPlatformOpenGLContext::context() const-
42{-
43 const QPlatformOpenGLContextPrivate * const d = d_func();-
44 return
never executed: return d->context;
d->context;
never executed: return d->context;
0
45}-
46-
47void QPlatformOpenGLContext::setContext(QOpenGLContext *context)-
48{-
49 QPlatformOpenGLContextPrivate * const d = d_func();-
50 d->context = context;-
51}
never executed: end of block
0
52-
53bool QPlatformOpenGLContext::parseOpenGLVersion(const QByteArray &versionString, int &major, int &minor)-
54{-
55 bool majorOk = false;-
56 bool minorOk = false;-
57 QList<QByteArray> parts = versionString.split(' ');-
58 if (versionString.startsWith(([]() -> QByteArray { enum { Size = sizeof("OpenGL ES") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "OpenGL ES" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
versionString....turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
59 if (parts.size() >= 3
parts.size() >= 3Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
60 QList<QByteArray> versionParts = parts.at(2).split('.');-
61 if (versionParts.size() >= 2
versionParts.size() >= 2Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
62 major = versionParts.at(0).toInt(&majorOk);-
63 minor = versionParts.at(1).toInt(&minorOk);-
64-
65 if (!minorOk
!minorOkDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
66 if (int idx = versionParts.at(1).indexOf('V')
int idx = vers...).indexOf('V')Description
TRUEnever evaluated
FALSEnever evaluated
)
0
67 minor = versionParts.at(1).left(idx).toInt(&minorOk);
never executed: minor = versionParts.at(1).left(idx).toInt(&minorOk);
0
68 }
never executed: end of block
else {
0
69 QMessageLogger(__FILE__, 146, __PRETTY_FUNCTION__).warning("Unrecognized OpenGL ES version");-
70 }
never executed: end of block
0
71 } else {-
72-
73 QMessageLogger(__FILE__, 150, __PRETTY_FUNCTION__).warning("Unrecognised OpenGL ES version");-
74 }
never executed: end of block
0
75 } else {-
76-
77 QList<QByteArray> versionParts = parts.at(0).split('.');-
78 if (versionParts.size() >= 2
versionParts.size() >= 2Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
79 major = versionParts.at(0).toInt(&majorOk);-
80 minor = versionParts.at(1).toInt(&minorOk);-
81 }
never executed: end of block
else {
0
82 QMessageLogger(__FILE__, 159, __PRETTY_FUNCTION__).warning("Unrecognized OpenGL version");-
83 }
never executed: end of block
0
84 }-
85-
86 if (!majorOk
!majorOkDescription
TRUEnever evaluated
FALSEnever evaluated
|| !minorOk
!minorOkDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
87 QMessageLogger(__FILE__, 164, __PRETTY_FUNCTION__).warning("Unrecognized OpenGL version");
never executed: QMessageLogger(__FILE__, 164, __PRETTY_FUNCTION__).warning("Unrecognized OpenGL version");
0
88 return
never executed: return (majorOk && minorOk);
(majorOk && minorOk);
never executed: return (majorOk && minorOk);
0
89}-
90-
91-
Switch to Source codePreprocessed file

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