aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickrectangle_p_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-04-24 23:54:21 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-04-28 17:46:46 +0000
commita28b6107f82fefe2b4e0a5f553b6dae5e3186168 (patch)
treeef166adf1246e4add626dbd71e1a98e247fcc923 /src/quick/items/qquickrectangle_p_p.h
parentb0cc12406ca853c0395f71436b3ef653eb383e97 (diff)
QQuickRectangle: Use parenting on QQuickPen to speed up pen changes
We know that signal connections are slow, so let's not use them. QObject has a parent pointer sitting there that looks nice and ripe, so: let's set the parent pointer ourselves, and call update() via QQuickPen. This improves delegates_rect_border.qml on my mbp by ~5%: Before: 394.6 frames; using samples; MedianAll=395; StdDev=2.30217, CoV=0.00583419 After: 417.4 frames; using samples; MedianAll=417; StdDev=1.67332, CoV=0.00400891 ... and should additionally decrease memory (no more signal connection). Hopefully, the decrease in allocation and increase in performance might also help with stability, since some systems seem a little flappy with this one. Change-Id: I885654d606bc77d2949b9db81217426cf367b081 Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/items/qquickrectangle_p_p.h')
-rw-r--r--src/quick/items/qquickrectangle_p_p.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/quick/items/qquickrectangle_p_p.h b/src/quick/items/qquickrectangle_p_p.h
index b7cd91bd73..3c1aaf7661 100644
--- a/src/quick/items/qquickrectangle_p_p.h
+++ b/src/quick/items/qquickrectangle_p_p.h
@@ -70,7 +70,6 @@ public:
~QQuickRectanglePrivate()
{
- delete pen;
}
QColor color;