diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2012-02-08 17:01:36 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-21 10:07:20 +0100 |
commit | 63f1fb2dfeabc01f14a1766a2277ece4d338b0e6 (patch) | |
tree | d8868c7bcebf660ef0f858eab8b7f20a266eb9bc /src/quick/items/qquickcanvas.cpp | |
parent | 94052647d25f3da3903574a66051466d09eecf5e (diff) |
Free ShaderEffectSource FBOs when no longer needed.
This commit also fixes handling of texture provider deletion in
ShaderEffect.
Change-Id: Ib22a9308a35325972bc545cf29de11bd625b22b2
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/items/qquickcanvas.cpp')
-rw-r--r-- | src/quick/items/qquickcanvas.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index 7f512028fd..8e536a45dd 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -327,6 +327,7 @@ void QQuickCanvasPrivate::init(QQuickCanvas *c) rootItem = new QQuickRootItem; QQuickItemPrivate *rootItemPrivate = QQuickItemPrivate::get(rootItem); rootItemPrivate->canvas = q; + rootItemPrivate->canvasRefCount = 1; rootItemPrivate->flags |= QQuickItem::ItemIsFocusScope; // In the absence of a focus in event on some platforms assume the window will @@ -800,11 +801,6 @@ QQuickCanvas::~QQuickCanvas() d->windowManager->canvasDestroyed(this); - // ### should we change ~QQuickItem to handle this better? - // manually cleanup for the root item (item destructor only handles these when an item is parented) - QQuickItemPrivate *rootItemPrivate = QQuickItemPrivate::get(d->rootItem); - rootItemPrivate->removeFromDirtyList(); - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); delete d->incubationController; d->incubationController = 0; |