aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/shapes/qquickshape_p_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-12-04 15:06:08 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-12-12 12:59:55 +0000
commit7b0a9e6a01b49f911ab7e98873731050380e9242 (patch)
tree21345f2729daa17256efb450ce33b10071f20914 /src/imports/shapes/qquickshape_p_p.h
parent52f7ab28172cea3710a16775b7a512fce821fc77 (diff)
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 <paolo.angelelli@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/imports/shapes/qquickshape_p_p.h')
-rw-r--r--src/imports/shapes/qquickshape_p_p.h7
1 files changed, 7 insertions, 0 deletions
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 <QPainterPath>
#include <QColor>
#include <QBrush>
+#include <QElapsedTimer>
#include <private/qopenglcontext_p.h>
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<QQuickShapePath *> sp;
bool enableVendorExts;
+ bool syncTimingActive = false;
+ int syncTimingTotalDirty;
+ int syncTimeCounter = 0;
+ QElapsedTimer syncTimer;
};
#if QT_CONFIG(opengl)