OpenCoverage

qsgmaterial.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/coreapi/qsgmaterial.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6class QSGMaterial;-
7class QSGMaterialShaderPrivate;-
8-
9namespace QSGBatchRenderer {-
10 class ShaderManager;-
11}-
12-
13class __attribute__((visibility("default"))) QSGMaterialShader-
14{-
15public:-
16 class __attribute__((visibility("default"))) RenderState {-
17 public:-
18 enum DirtyState-
19 {-
20 DirtyMatrix = 0x0001,-
21 DirtyOpacity = 0x0002,-
22 DirtyCachedMaterialData = 0x0004,-
23 DirtyAll = 0xFFFF-
24 };-
25 typedef QFlags<DirtyState> DirtyStates;-
26-
27 inline DirtyStates dirtyStates() const { return
never executed: return m_dirty;
m_dirty;
never executed: return m_dirty;
}
0
28-
29 inline bool isMatrixDirty() const { return
executed 120239 times by 71 tests: return m_dirty & DirtyMatrix;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
m_dirty & DirtyMatrix;
executed 120239 times by 71 tests: return m_dirty & DirtyMatrix;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
}
120239
30 inline bool isOpacityDirty() const { return
executed 81130 times by 67 tests: return m_dirty & DirtyOpacity;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitem
  • ...
m_dirty & DirtyOpacity;
executed 81130 times by 67 tests: return m_dirty & DirtyOpacity;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitem
  • ...
}
81130
31 bool isCachedMaterialDataDirty() const { return
never executed: return m_dirty & DirtyCachedMaterialData;
m_dirty & DirtyCachedMaterialData;
never executed: return m_dirty & DirtyCachedMaterialData;
}
0
32-
33 float opacity() const;-
34 QMatrix4x4 combinedMatrix() const;-
35 QMatrix4x4 modelViewMatrix() const;-
36 QMatrix4x4 projectionMatrix() const;-
37 QRect viewportRect() const;-
38 QRect deviceRect() const;-
39 float determinant() const;-
40 float devicePixelRatio() const;-
41-
42 QOpenGLContext *context() const;-
43-
44 private:-
45 friend class QSGRenderer;-
46 DirtyStates m_dirty;-
47 const void *m_data;-
48 };-
49-
50 QSGMaterialShader();-
51 virtual ~QSGMaterialShader();-
52-
53 virtual void activate();-
54 virtual void deactivate();-
55-
56 virtual void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);-
57 virtual char const *const *attributeNames() const = 0;-
58-
59 inline QOpenGLShaderProgram *program() { return
executed 356192 times by 71 tests: return &m_program;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
&m_program;
executed 356192 times by 71 tests: return &m_program;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
}
356192
60-
61protected:-
62 inline QSGMaterialShaderPrivate* d_func() { return
executed 11936 times by 71 tests: return reinterpret_cast<QSGMaterialShaderPrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
reinterpret_cast<QSGMaterialShaderPrivate *>(qGetPtrHelper(d_ptr));
executed 11936 times by 71 tests: return reinterpret_cast<QSGMaterialShaderPrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
} inline const QSGMaterialShaderPrivate* d_func() const { return
executed 8806 times by 71 tests: return reinterpret_cast<const QSGMaterialShaderPrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
reinterpret_cast<const QSGMaterialShaderPrivate *>(qGetPtrHelper(d_ptr));
executed 8806 times by 71 tests: return reinterpret_cast<const QSGMaterialShaderPrivate *>(qGetPtrHelper(d_ptr));
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
} friend class QSGMaterialShaderPrivate;
8806-11936
63 QSGMaterialShader(QSGMaterialShaderPrivate &dd);-
64-
65 friend class QSGDefaultRenderContext;-
66 friend class QSGBatchRenderer::ShaderManager;-
67-
68 void setShaderSourceFile(QOpenGLShader::ShaderType type, const QString &sourceFile);-
69 void setShaderSourceFiles(QOpenGLShader::ShaderType type, const QStringList &sourceFiles);-
70-
71 virtual void compile();-
72-
73 virtual void initialize() { }-
74-
75 virtual const char *vertexShader() const;-
76 virtual const char *fragmentShader() const;-
77-
78private:-
79-
80 QOpenGLShaderProgram m_program;-
81-
82 QScopedPointer<QSGMaterialShaderPrivate> d_ptr;-
83};-
84-
85struct QSGMaterialType { };-
86-
87class __attribute__((visibility("default"))) QSGMaterial-
88{-
89public:-
90 enum Flag {-
91 Blending = 0x0001,-
92 RequiresDeterminant = 0x0002,-
93 RequiresFullMatrixExceptTranslate = 0x0004 | RequiresDeterminant,-
94 RequiresFullMatrix = 0x0008 | RequiresFullMatrixExceptTranslate,-
95-
96 CustomCompileStep = 0x0010-
97 };-
98 typedef QFlags<Flag> Flags;-
99-
100 QSGMaterial();-
101 virtual ~QSGMaterial();-
102-
103 virtual QSGMaterialType *type() const = 0;-
104 virtual QSGMaterialShader *createShader() const = 0;-
105 virtual int compare(const QSGMaterial *other) const;-
106-
107 QSGMaterial::Flags flags() const { return
executed 2006535 times by 72 tests: return m_flags;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • ...
m_flags;
executed 2006535 times by 72 tests: return m_flags;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_nodestest
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • ...
}
2006535
108 void setFlag(Flags flags, bool on = true);-
109-
110private:-
111 Flags m_flags;-
112 void *m_reserved;-
113 QSGMaterial(const QSGMaterial &) = delete; QSGMaterial &operator=(const QSGMaterial &) = delete;-
114};-
115-
116constexpr inline QFlags<QSGMaterial::Flags::enum_type> operator|(QSGMaterial::Flags::enum_type f1, QSGMaterial::Flags::enum_type f2) noexcept { return QFlags<QSGMaterial::Flags::enum_type>(f1) | f2; } constexpr inline QFlags<QSGMaterial::Flags::enum_type> operator|(QSGMaterial::Flags::enum_type f1, QFlags<QSGMaterial::Flags::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QSGMaterial::Flags::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); }-
117constexpr inline QFlags<QSGMaterialShader::RenderState::DirtyStates::enum_type> operator|(QSGMaterialShader::RenderState::DirtyStates::enum_type f1, QSGMaterialShader::RenderState::DirtyStates::enum_type f2) noexcept { return QFlags<QSGMaterialShader::RenderState::DirtyStates::enum_type>(f1) | f2; } constexpr inline QFlags<QSGMaterialShader::RenderState::DirtyStates::enum_type> operator|(QSGMaterialShader::RenderState::DirtyStates::enum_type f1, QFlags<QSGMaterialShader::RenderState::DirtyStates::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QSGMaterialShader::RenderState::DirtyStates::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); }-
118-
119-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0