| Line | Source | Count |
| 1 | | - |
| 2 | static_assert(bool(1 == 1), "Required feature " "quick_shadereffect" " for file " __FILE__ " not available."); | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | struct QQuickOpenGLShaderEffectMaterialKey { | - |
| 9 | enum ShaderType | - |
| 10 | { | - |
| 11 | VertexShader, | - |
| 12 | FragmentShader, | - |
| 13 | ShaderTypeCount | - |
| 14 | }; | - |
| 15 | | - |
| 16 | QByteArray sourceCode[ShaderTypeCount]; | - |
| 17 | | - |
| 18 | bool operator == (const QQuickOpenGLShaderEffectMaterialKey &other) const; | - |
| 19 | bool operator != (const QQuickOpenGLShaderEffectMaterialKey &other) const; | - |
| 20 | }; | - |
| 21 | | - |
| 22 | uint qHash(const QQuickOpenGLShaderEffectMaterialKey &key); | - |
| 23 | | - |
| 24 | class QQuickCustomMaterialShader; | - |
| 25 | class QQuickOpenGLShaderEffectNode; | - |
| 26 | class __attribute__((visibility("default"))) QQuickOpenGLShaderEffectMaterial : public QSGMaterial | - |
| 27 | { | - |
| 28 | public: | - |
| 29 | struct UniformData | - |
| 30 | { | - |
| 31 | enum SpecialType { None, Sampler, SamplerExternal, SubRect, Opacity, Matrix }; | - |
| 32 | | - |
| 33 | QByteArray name; | - |
| 34 | QVariant value; | - |
| 35 | int propertyIndex = -1; | - |
| 36 | SpecialType specialType; | - |
| 37 | | - |
| 38 | bool operator == (const UniformData &other) const; | - |
| 39 | | - |
| 40 | void setValueFromProperty(QObject *item, const QMetaObject *itemMetaObject) | - |
| 41 | { | - |
| 42 | if (propertyIndex == -1| TRUE | evaluated 46 times by 5 testsEvaluated by:- tst_examples
- tst_qquickborderimage
- tst_qquickcustomparticle
- tst_qquickitemlayer
- tst_qquickshadereffect
| | FALSE | evaluated 94 times by 3 testsEvaluated by:- tst_examples
- tst_qquickitemlayer
- tst_qquickshadereffect
|
) { | 46-94 |
| 43 | value = item->property(name); | - |
| 44 | }executed 46 times by 5 tests: end of blockExecuted by:- tst_examples
- tst_qquickborderimage
- tst_qquickcustomparticle
- tst_qquickitemlayer
- tst_qquickshadereffect
else { | 46 |
| 45 | value = itemMetaObject->property(propertyIndex).read(item); | - |
| 46 | }executed 94 times by 3 tests: end of blockExecuted by:- tst_examples
- tst_qquickitemlayer
- tst_qquickshadereffect
| 94 |
| 47 | } | - |
| 48 | }; | - |
| 49 | | - |
| 50 | explicit QQuickOpenGLShaderEffectMaterial(QQuickOpenGLShaderEffectNode *node = nullptr); | - |
| 51 | QSGMaterialType *type() const override; | - |
| 52 | QSGMaterialShader *createShader() const override; | - |
| 53 | int compare(const QSGMaterial *other) const override; | - |
| 54 | | - |
| 55 | QVector<QByteArray> attributes; | - |
| 56 | QVector<UniformData> uniforms[QQuickOpenGLShaderEffectMaterialKey::ShaderTypeCount]; | - |
| 57 | QVector<QSGTextureProvider *> textureProviders; | - |
| 58 | QQuickShaderEffect::CullMode cullMode; | - |
| 59 | bool geometryUsesTextureSubRect; | - |
| 60 | | - |
| 61 | void setProgramSource(const QQuickOpenGLShaderEffectMaterialKey &source); | - |
| 62 | void updateTextures() const; | - |
| 63 | void invalidateTextureProvider(QSGTextureProvider *provider); | - |
| 64 | | - |
| 65 | static void cleanupMaterialCache(); | - |
| 66 | | - |
| 67 | protected: | - |
| 68 | friend class QQuickCustomMaterialShader; | - |
| 69 | | - |
| 70 | | - |
| 71 | | - |
| 72 | | - |
| 73 | | - |
| 74 | | - |
| 75 | QSGMaterialType *m_type; | - |
| 76 | QQuickOpenGLShaderEffectMaterialKey m_source; | - |
| 77 | | - |
| 78 | QQuickOpenGLShaderEffectNode *m_node; | - |
| 79 | bool m_emittedLogChanged; | - |
| 80 | }; | - |
| 81 | | - |
| 82 | | - |
| 83 | class QSGShaderEffectMesh; | - |
| 84 | | - |
| 85 | class __attribute__((visibility("default"))) QQuickOpenGLShaderEffectNode : public QObject, public QSGGeometryNode | - |
| 86 | { | - |
| 87 | public: | - |
| 88 | #pragma GCC diagnostic push | - |
| 89 | | - |
| 90 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
| 91 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - |
| 92 | #pragma GCC diagnostic ignored "-Wattributes" | - |
| 93 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
| 94 | #pragma GCC diagnostic pop | - |
| 95 | struct QPrivateSignal {}; | - |
| 96 | public: | - |
| 97 | QQuickOpenGLShaderEffectNode(); | - |
| 98 | ~QQuickOpenGLShaderEffectNode() override; | - |
| 99 | | - |
| 100 | void preprocess() override; | - |
| 101 | | - |
| 102 | public : | - |
| 103 | void logAndStatusChanged(const QString &, int status); | - |
| 104 | void dirtyTexture(); | - |
| 105 | | - |
| 106 | private : | - |
| 107 | void markDirtyTexture(); | - |
| 108 | void textureProviderDestroyed(QObject *object); | - |
| 109 | }; | - |
| 110 | | - |
| 111 | | - |
| | |