diff options
author | Alessandro Portale <[email protected]> | 2021-07-13 19:23:39 +0200 |
---|---|---|
committer | Alessandro Portale <[email protected]> | 2021-08-11 08:04:32 +0000 |
commit | 84a017051693bab44a96f92fb4fd3f0c60264800 (patch) | |
tree | 3c10b67df854b712a39263c2ab1f4d6557b035e8 /src/libs/tracing/timelineitemsrenderpass.h | |
parent | f95d6c6009ae2d2bd905daaa4d69edd9bbe7ae97 (diff) |
Tracing/QmlProfiler: Prepare for porting of shaders to Qt 6
This change touches up the shader handling code in Tracing and
QmlProfiler in order to pave the way for the pending porting of
the shaders to Qt 6.
- Use QSGGeometry::Attribute::createWithAttributeType instead of
QSGGeometry::Attribute::create
- Undefine some fields that are unused in Qt 6
- Add a couple of comments to document the relation between C++
variables and shader attributes
- Extract some code into functions
Change-Id: I0e7119484b6190a415a5c2d2a0bbd6465088cf19
Reviewed-by: Henning Gründl <[email protected]>
Diffstat (limited to 'src/libs/tracing/timelineitemsrenderpass.h')
-rw-r--r-- | src/libs/tracing/timelineitemsrenderpass.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libs/tracing/timelineitemsrenderpass.h b/src/libs/tracing/timelineitemsrenderpass.h index 807f0ed5518..9d52be9ac71 100644 --- a/src/libs/tracing/timelineitemsrenderpass.h +++ b/src/libs/tracing/timelineitemsrenderpass.h @@ -48,7 +48,7 @@ public: #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QSGMaterialShader *createShader() const override; #else - QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const override; + QSGMaterialShader *createShader(QSGRendererInterface::RenderMode) const override; #endif // < Qt 6 private: @@ -83,8 +83,10 @@ public: static OpaqueColoredPoint2DWithSize *fromVertexData(QSGGeometry *geometry); private: - float x, y, w, h, id; - unsigned char r, g, b, a; + float x, y; // vec4 vertexCoord + float w, h; // vec2 rectSize + float id; // float selectionId + unsigned char r, g, b, a; // vec4 vertexColor void setCommon(const OpaqueColoredPoint2DWithSize *master); void setLeft(const OpaqueColoredPoint2DWithSize *master); |