From 9acb48a64ec6ca133f09e0757ff9f2359f55c983 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 7 Aug 2013 10:07:34 +0200 Subject: [PATCH] Stop the update timer when no windows are visible Change-Id: Ib9758a99891829d9bec81996687373d08ecfa055 Reviewed-by: Robin Burchell --- src/quick/scenegraph/qsgthreadedrenderloop.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 1e0d7c5..15b6bdc 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -963,8 +963,11 @@ void QSGThreadedRenderLoop::releaseResources(QQuickWindow *window, bool inDestru void QSGThreadedRenderLoop::polishAndSync() { - if (!anyoneShowing()) + if (!anyoneShowing()) { + killTimer(m_update_timer); + m_update_timer = 0; return; + } RLDEBUG("GUI: polishAndSync()"); -- 2.7.4