aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/shapes/qquickshape_p_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-01-15 17:17:41 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-01-16 11:36:39 +0000
commit196c691ebce3a48c6479162f3084790b6d0af8b8 (patch)
tree51d345da5896628450938ecf2c73ac97bbe6a99d /src/imports/shapes/qquickshape_p_p.h
parent4f48a54fdcc78416070c6846d8df4aacf36194a7 (diff)
QQuickShapePrivate: use header init, order storage by type
Header initialization makes it more clear that initialization is being done properly (and in fact a couple of these were not). Ordering by type allows compilers to pack the bools and enums into a bitfield. (Unfortunately explicit bitfields aren't syntactically compatible with header initialization, so we leave it up to the compiler to make this optimization on its own, since Shape is not intended to be used in large numbers anyway.) Change-Id: I68b1f5dec59bc2c487ab37bd3495eca19736bc21 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/imports/shapes/qquickshape_p_p.h')
-rw-r--r--src/imports/shapes/qquickshape_p_p.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/imports/shapes/qquickshape_p_p.h b/src/imports/shapes/qquickshape_p_p.h
index f43831516a..eb7fdc3bc8 100644
--- a/src/imports/shapes/qquickshape_p_p.h
+++ b/src/imports/shapes/qquickshape_p_p.h
@@ -170,17 +170,17 @@ public:
static void asyncShapeReady(void *data);
- bool spChanged;
- QQuickShape::RendererType rendererType;
- bool async;
- QQuickShape::Status status;
- QQuickAbstractPathRenderer *renderer;
QVector<QQuickShapePath *> sp;
- bool enableVendorExts;
- bool syncTimingActive = false;
- int syncTimingTotalDirty;
- int syncTimeCounter = 0;
QElapsedTimer syncTimer;
+ QQuickAbstractPathRenderer *renderer = nullptr;
+ int syncTimingTotalDirty = 0;
+ int syncTimeCounter = 0;
+ QQuickShape::Status status = QQuickShape::Null;
+ QQuickShape::RendererType rendererType = QQuickShape::UnknownRenderer;
+ bool spChanged = false;
+ bool async = false;
+ bool enableVendorExts = true;
+ bool syncTimingActive = false;
};
#if QT_CONFIG(opengl)