diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-04-25 00:03:22 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-04-28 17:46:49 +0000 |
commit | 9709d04ba7787c853a1ddbeed0347eab27c0924f (patch) | |
tree | 9c2e796acad520e7e4db47a5113439b7f1b53e26 /src/quick/items/qquickrectangle_p.h | |
parent | a28b6107f82fefe2b4e0a5f553b6dae5e3186168 (diff) |
QQuickRectangle: Optimize setGradient
Similarly to the QQuickPen optimization, we can avoid a signal
connection by using the parent pointer of the QQuickGradient.
This improves qmlbench's delegates_rect_gradient.qml by ~6% for me:
Before: 300.6 frames; using samples; MedianAll=301; StdDev=4.61519, CoV=0.01535
After: 320.4 frames; using samples; MedianAll=321; StdDev=1.94936, CoV=0.00608414
Again, hopefully, the resulting lessening in allocations and improvement
in performance will help stabilize the benchmark a little on some
systems, as well as the improvement to performance and memory use.
Change-Id: Id8e0399f5a4a0ef55d7fc9b8f100af229f389ddd
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/items/qquickrectangle_p.h')
-rw-r--r-- | src/quick/items/qquickrectangle_p.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h index 724a06013c..627f778e44 100644 --- a/src/quick/items/qquickrectangle_p.h +++ b/src/quick/items/qquickrectangle_p.h @@ -129,9 +129,6 @@ public: QGradientStops gradientStops() const; -Q_SIGNALS: - void updated(); - private: void doUpdate(); @@ -172,9 +169,6 @@ Q_SIGNALS: protected: QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE; -private Q_SLOTS: - void doUpdate(); - private: Q_DISABLE_COPY(QQuickRectangle) Q_DECLARE_PRIVATE(QQuickRectangle) |