From 5f0013ee76605b9c7ceab168702b57e797b698e0 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 15 Feb 2012 11:32:02 +0100 Subject: Introduced QQuickCanvas::releaseResources(). This function can be used in certain situations to purge the texture cache and triggers more lazily to take down the scene graph and GL context Change-Id: Icd9360ff50fda0e721ba0f1b520cda678e457a35 Reviewed-by: Aaron Kennedy --- tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp b/tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp index eac0d851d5..8f0c4e6fce 100644 --- a/tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp +++ b/tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp @@ -685,7 +685,9 @@ void tst_qquickcanvas::headless() // Hide the canvas and verify signal emittion and GL context deletion canvas->hide(); - QCOMPARE(invalidated.size(), 1); + canvas->releaseResources(); + + QTRY_COMPARE(invalidated.size(), 1); QVERIFY(canvas->openglContext() == 0); // Destroy the native windowing system buffers -- cgit v1.2.3