From 7b0a9e6a01b49f911ab7e98873731050380e9242 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 4 Dec 2017 15:06:08 +0100 Subject: Add optional timing logs for Shape triangulation Follow the scenegraph's approach with qt.scenegraph.time.* categories and add qt.shape.time.sync. When enabled, this will print a line for each sync() that had something to process. For asynchronous items this includes all the time from requesting the backend to start the work right up to the finished callback, and thus can be somewhat misleading. Task-number: QTBUG-64951 Change-Id: Ib51a9d4adba4cdc7d692eb7ff14627a5d0e548cf Reviewed-by: Paolo Angelelli Reviewed-by: Andy Nichols --- src/imports/shapes/qquickshape_p_p.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/imports/shapes/qquickshape_p_p.h') diff --git a/src/imports/shapes/qquickshape_p_p.h b/src/imports/shapes/qquickshape_p_p.h index bbe9a81d4a..f43831516a 100644 --- a/src/imports/shapes/qquickshape_p_p.h +++ b/src/imports/shapes/qquickshape_p_p.h @@ -56,6 +56,7 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE @@ -167,6 +168,8 @@ public: static QQuickShapePrivate *get(QQuickShape *item) { return item->d_func(); } + static void asyncShapeReady(void *data); + bool spChanged; QQuickShape::RendererType rendererType; bool async; @@ -174,6 +177,10 @@ public: QQuickAbstractPathRenderer *renderer; QVector sp; bool enableVendorExts; + bool syncTimingActive = false; + int syncTimingTotalDirty; + int syncTimeCounter = 0; + QElapsedTimer syncTimer; }; #if QT_CONFIG(opengl) -- cgit v1.2.3