diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-10-27 19:54:23 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2014-11-21 14:50:21 +0200 |
commit | bfbad9b941598f4e4c693cac4a01b5cb76e4397b (patch) | |
tree | d5976062849eae3d3b819d3fe6edd3ee0e3510a9 /plugins/qmlprofilerextension/scenegraphtimelinemodel.h | |
parent | 587caba5e7dbb007b162e7db594922e64a509387 (diff) |
Don't use AbstractTimelineModel's private class
We can easily implement all needed functionality with only the public
interface.
Change-Id: Ibf22f2e4bc27a8b506f0164e0e1fdf529b1a9e45
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'plugins/qmlprofilerextension/scenegraphtimelinemodel.h')
-rw-r--r-- | plugins/qmlprofilerextension/scenegraphtimelinemodel.h | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/plugins/qmlprofilerextension/scenegraphtimelinemodel.h b/plugins/qmlprofilerextension/scenegraphtimelinemodel.h index 258b3a80e0..0454e35ec0 100644 --- a/plugins/qmlprofilerextension/scenegraphtimelinemodel.h +++ b/plugins/qmlprofilerextension/scenegraphtimelinemodel.h @@ -33,10 +33,46 @@ class SceneGraphTimelineModel : public QmlProfiler::AbstractTimelineModel { Q_OBJECT public: + enum SceneGraphStage { + MinimumSceneGraphStage = 0, + Polish = MinimumSceneGraphStage, + Wait, + GUIThreadSync, + Animations, + MaximumGUIThreadStage, + + RenderThreadSync = MaximumGUIThreadStage, + Render, + Swap, + MaximumRenderThreadStage, + + RenderPreprocess = MaximumRenderThreadStage, + RenderUpdate, + RenderBind, + RenderRender, + MaximumRenderStage, + + Material = MaximumRenderStage, + MaximumMaterialStage, + + GlyphRender = MaximumMaterialStage, + GlyphStore, + MaximumGlyphStage, + + TextureBind = MaximumGlyphStage, + TextureConvert, + TextureSwizzle, + TextureUpload, + TextureMipmap, + TextureDeletion, + MaximumTextureStage, + + MaximumSceneGraphStage = MaximumTextureStage + }; struct SceneGraphEvent { - SceneGraphEvent(int stage = -1, int glyphCount = -1); - int stage; + SceneGraphEvent(SceneGraphStage stage = MaximumSceneGraphStage, int glyphCount = -1); + SceneGraphStage stage; int rowNumberCollapsed; int glyphCount; // only used for one event type }; @@ -57,8 +93,12 @@ protected: void clear(); private: - class SceneGraphTimelineModelPrivate; - Q_DECLARE_PRIVATE(SceneGraphTimelineModel) + void flattenLoads(); + qint64 insert(qint64 start, qint64 duration, int typeIndex, SceneGraphStage stage, + int glyphCount = -1); + static const char *threadLabel(SceneGraphStage stage); + + QVector<SceneGraphEvent> m_data; }; } // namespace Internal |