| Line | Source | Count | 
| 1 |  | - | 
| 2 |  | - | 
| 3 |  | - | 
| 4 |  | - | 
| 5 |  | - | 
| 6 |  | - | 
| 7 |  | - | 
| 8 |  | - | 
| 9 |  | - | 
| 10 |  | - | 
| 11 |  | - | 
| 12 |  | - | 
| 13 |  | - | 
| 14 |  | - | 
| 15 |  | - | 
| 16 |  | - | 
| 17 |  | - | 
| 18 |  | - | 
| 19 |  | - | 
| 20 |  | - | 
| 21 |  | - | 
| 22 |  | - | 
| 23 |  | - | 
| 24 |  | - | 
| 25 |  | - | 
| 26 |  | - | 
| 27 |  | - | 
| 28 |  | - | 
| 29 |  | - | 
| 30 |  | - | 
| 31 |  | - | 
| 32 |  | - | 
| 33 |  | - | 
| 34 |  | - | 
| 35 |  | - | 
| 36 |  | - | 
| 37 |  | - | 
| 38 |  | - | 
| 39 |  | - | 
| 40 |  | - | 
| 41 |  | - | 
| 42 |  | - | 
| 43 | #include "qopenglfunctions_1_0.h" | - | 
| 44 | #include "qopenglcontext.h" | - | 
| 45 |  | - | 
| 46 | QT_BEGIN_NAMESPACE | - | 
| 47 |  | - | 
| 48 |  | - | 
| 49 |  | - | 
| 50 |  | - | 
| 51 |  | - | 
| 52 |  | - | 
| 53 |  | - | 
| 54 |  | - | 
| 55 |  | - | 
| 56 |  | - | 
| 57 |  | - | 
| 58 |  | - | 
| 59 |  | - | 
| 60 |  | - | 
| 61 |  | - | 
| 62 | QOpenGLFunctions_1_0::QOpenGLFunctions_1_0() | - | 
| 63 |  : QAbstractOpenGLFunctions() | - | 
| 64 |  , d_1_0_Core(0) | - | 
| 65 |  , d_1_0_Deprecated(0) | - | 
| 66 | { | - | 
| 67 | } never executed: end of block  | 0 | 
| 68 |  | - | 
| 69 | QOpenGLFunctions_1_0::~QOpenGLFunctions_1_0() | - | 
| 70 | { | - | 
| 71 |     if (d_1_0_Core && !d_1_0_Core->refs.deref()) {| TRUE | never evaluated |  | FALSE | never evaluated |  
 | TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 72 |         QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | 
| 73 |         delete d_1_0_Core; | - | 
| 74 |     } never executed: end of block  | 0 | 
| 75 |     if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {| TRUE | never evaluated |  | FALSE | never evaluated |  
 | TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 76 |         QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | 
| 77 |         delete d_1_0_Deprecated; | - | 
| 78 |     } never executed: end of block  | 0 | 
| 79 | } never executed: end of block  | 0 | 
| 80 |  | - | 
| 81 | bool QOpenGLFunctions_1_0::initializeOpenGLFunctions() | - | 
| 82 | { | - | 
| 83 |     if ( isInitialized() )| TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 84 |         return true; never executed: return true;  | 0 | 
| 85 |  | - | 
| 86 |     QOpenGLContext* context = QOpenGLContext::currentContext(); | - | 
| 87 |  | - | 
| 88 |      | - | 
| 89 |      | - | 
| 90 |     if (((owningContext() && owningContext() == context) || !owningContext())| TRUE | never evaluated |  | FALSE | never evaluated |  
 | TRUE | never evaluated |  | FALSE | never evaluated |  
 | TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 91 |         && QOpenGLFunctions_1_0::isContextCompatible(context))| TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 92 |     { | - | 
| 93 |          | - | 
| 94 |          | - | 
| 95 |         QOpenGLVersionFunctionsBackend* d = 0; | - | 
| 96 |         d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | 
| 97 |         if (!d) {| TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 98 |             d = new QOpenGLFunctions_1_0_CoreBackend(context); | - | 
| 99 |             QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - | 
| 100 |         } never executed: end of block  | 0 | 
| 101 |         d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - | 
| 102 |         d->refs.ref(); | - | 
| 103 |  | - | 
| 104 |         d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | 
| 105 |         if (!d) {| TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 106 |             d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | - | 
| 107 |             QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | - | 
| 108 |         } never executed: end of block  | 0 | 
| 109 |         d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - | 
| 110 |         d->refs.ref(); | - | 
| 111 |  | - | 
| 112 |         QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - | 
| 113 |     } never executed: end of block  | 0 | 
| 114 |     return isInitialized(); never executed: return isInitialized();  | 0 | 
| 115 | } | - | 
| 116 |  | - | 
| 117 | bool QOpenGLFunctions_1_0::isContextCompatible(QOpenGLContext *context) | - | 
| 118 | { | - | 
| 119 |     Q_ASSERT(context); | - | 
| 120 |     QSurfaceFormat f = context->format(); | - | 
| 121 |     const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - | 
| 122 |     if (v < qMakePair(1, 0))| TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 123 |         return false; never executed: return false;  | 0 | 
| 124 |  | - | 
| 125 |     if (f.profile() == QSurfaceFormat::CoreProfile)| TRUE | never evaluated |  | FALSE | never evaluated |  
  | 0 | 
| 126 |         return false; never executed: return false;  | 0 | 
| 127 |  | - | 
| 128 |     return true; never executed: return true;  | 0 | 
| 129 | } | - | 
| 130 |  | - | 
| 131 | QOpenGLVersionProfile QOpenGLFunctions_1_0::versionProfile() | - | 
| 132 | { | - | 
| 133 |     QOpenGLVersionProfile v; | - | 
| 134 |     v.setVersion(1, 0); | - | 
| 135 |     return v; never executed: return v;  | 0 | 
| 136 | } | - | 
| 137 |  | - | 
| 138 | QT_END_NAMESPACE | - | 
 |  |  |