aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickanchors_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-04-20 13:39:58 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-05-10 08:17:00 +0000
commitc6c0d730b7a88fa22f40d597183e91b73d9d165d (patch)
tree721fe747e03d5157f53a72992e71e33c2d1e72f9 /src/quick/items/qquickanchors_p.h
parentb697f511ab226079c161ea68c18ac85c5533d3cc (diff)
QML: Remove internal field padding from QQuickAnchorPrivate.
Don't store QQuickAnchorLine, but store both fields separately in QQuickAnchorPrivate. This prevents padding of QQuickAnchorLine, saving 48 bytes on x86_64 (or any platform where structs are 8-byte aligned). On x86_64, this also removes ~180 instructions for each QQuickAnchor creation/removal, and speeds up the constructor by 25%. While in the neighborhood, do a drive-by change and merge QQuickAnchorLine::AnchorLine and QQuickAnchors::Anchor by removing the former. Change-Id: I50ab6252b1903f5f1a075174e6185c3048a8f8ec Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickanchors_p.h')
-rw-r--r--src/quick/items/qquickanchors_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickanchors_p.h b/src/quick/items/qquickanchors_p.h
index 0e02d80ae8..d3c8ed82be 100644
--- a/src/quick/items/qquickanchors_p.h
+++ b/src/quick/items/qquickanchors_p.h
@@ -90,6 +90,7 @@ public:
virtual ~QQuickAnchors();
enum Anchor {
+ InvalidAnchor = 0x0,
LeftAnchor = 0x01,
RightAnchor = 0x02,
TopAnchor = 0x04,