diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-07-30 16:13:51 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2014-08-14 15:18:04 +0200 |
commit | 0fddeff6bc3f1f8f15f7bbf0a7c43abfb340ccfd (patch) | |
tree | f5123dc490d46d4f116c87059554a95defb502e9 /src/core/qscenepropertychange.h | |
parent | fe6f56f22c2db5e06791a7a79fbbd2dd2ff1f8d9 (diff) |
QScenePropertyChange use QFrameAllocator
The operator new and delete were overloaded to allocate memory by using a
QFrameAllocator. This allow to reuse memory over time and reduce the cost of
using the new operator to allocate scenepropertychange which can be quite
important for a frame.
Change-Id: I33e156f35bcc3c486521d70d5b09c7dd3df85fec
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/qscenepropertychange.h')
-rw-r--r-- | src/core/qscenepropertychange.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/qscenepropertychange.h b/src/core/qscenepropertychange.h index dc1bd721d..b8e65309e 100644 --- a/src/core/qscenepropertychange.h +++ b/src/core/qscenepropertychange.h @@ -55,6 +55,7 @@ class QT3DCORESHARED_EXPORT QScenePropertyChange : public QSceneChange public: QScenePropertyChange(ChangeFlag type, QObservableInterface *subject, Priority priority = Standard); QScenePropertyChange(ChangeFlag type, QNode *node, Priority priority = Standard); + virtual ~QScenePropertyChange(); QByteArray propertyName() const; QVariant value() const; @@ -62,6 +63,9 @@ public: void setPropertyName(const QByteArray &name); void setValue(const QVariant &value); + static void *operator new(size_t size); + static void operator delete(void *ptr); + protected: Q_DECLARE_PRIVATE(QScenePropertyChange) QScenePropertyChange(QScenePropertyChangePrivate &dd); |