diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-02 16:30:26 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-05 18:54:51 +0100 |
commit | 025365f1dc6dc9c3244a125882433e55b57fa672 (patch) | |
tree | 6cab46d0595e7c9a8b61c8f2eb620dba009f30f8 /src/quick | |
parent | c9a90b3181723061e27e7545b70a66dda4f4306d (diff) |
Refactor marking GC'ed objects
Don't use recursive function calls anymore. Instead, push marked
objects onto the JS stack, and then pop them off when their children
are being marked.
Should reduce stack memory usage, and improves performance by ~5%.
Change-Id: I2d37d97579144fcba87ec8e9fd545dd220c01fbb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 3088c41cd7..99dfff47a2 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -908,8 +908,9 @@ struct QQuickJSContext2DImageData : public QV4::Object static QV4::ReturnedValue method_get_height(QV4::SimpleCallContext *ctx); static QV4::ReturnedValue method_get_data(QV4::SimpleCallContext *ctx); - static void markObjects(Managed *that) { - static_cast<QQuickJSContext2DImageData *>(that)->pixelData.mark(); + static void markObjects(Managed *that, QV4::ExecutionEngine *engine) { + static_cast<QQuickJSContext2DImageData *>(that)->pixelData.mark(engine); + QV4::Object::markObjects(that, engine); } |