summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-12 12:27:15 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-12 12:27:15 (GMT)
commit60475e93890550f4fb67367980249a21b9346747 (patch)
tree95f9ba0b8c3fad06a46ca05e7cfc37f3a66519ea /src
parent565e8679374e71df9f72074dd3c71c929aeeafc8 (diff)
downloadQt-60475e93890550f4fb67367980249a21b9346747.zip
Qt-60475e93890550f4fb67367980249a21b9346747.tar.gz
Qt-60475e93890550f4fb67367980249a21b9346747.tar.bz2
Have the backing store destroyed also in special Symbian scenarios.
The backing store tracker's registerWidget and unregisterWidget functions are called when EPartiallyVisible and ENotVisible events come from WSERV. However if an application sends its window group to background right after caling show() and before entering the event loop, there is a chance that all the application will receive is an ENotVisible event, leading to calling unregisterWidget() without a previous registerWidget(). In this case the backing store was not destroyed and the application was consuming GPU memory even while it was staying in background. This patch ensures registerWidget() is called always before unregisterWidget() in the Symbian-specific event handler for ENotVisible, and replaces the previous patch, a12d41076919a133e63de63dff5c1a131a0564e4, which caused regression in autotests. Task-number: QTBUG-18493 Reviewed-by: Gareth Stockwell
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index d37845d..f73eb02 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -215,6 +215,12 @@ void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible)
widget->repaint();
}
} else {
+ // In certain special scenarios we may get an ENotVisible event
+ // without a previous EPartiallyVisible. The backingstore must
+ // still be destroyed, hence the registerWidget() call below.
+ if (backingStore.data() && widget->internalWinId()
+ && qt_widget_private(widget)->maybeBackingStore() == backingStore.data())
+ backingStore.registerWidget(widget);
backingStore.unregisterWidget(widget);
// In order to ensure that any resources used by the window surface
// are immediately freed, we flush the WSERV command buffer.