summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-02-04 13:15:56 (GMT)
committerJason Barron <jbarron@trolltech.com>2010-02-04 14:10:47 (GMT)
commit91e236022acd79dfbc4aef9e30edb4d1aeb2685c (patch)
treea23bbc7bbdb65423e569ac70ffcd3388b9555064 /src/gui/kernel/qapplication_s60.cpp
parent56d1da45bc15989542fe3621c9c9de444219729c (diff)
downloadQt-91e236022acd79dfbc4aef9e30edb4d1aeb2685c.zip
Qt-91e236022acd79dfbc4aef9e30edb4d1aeb2685c.tar.gz
Qt-91e236022acd79dfbc4aef9e30edb4d1aeb2685c.tar.bz2
Flush the WSERV command buffer after deleting a surface.
For graphics systems that use EGL surfaces in the backing store destroying the surface does not guarantee that the memory is immediately freed because this command does not cause a flush. This implies that a manual flush is instead needed. We do this in 2 places; the first is when the surface is destroyed due to a visibility changed. The second case is just after the window has been destroyed. At this point the backing store has already been deleted so the deletion of both the surface and window can happen atomically in WSERV. Task-number: QT-2506 Reviewed-by: Iain
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 6caac9f..6e03d7c 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1647,6 +1647,9 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent
if (visChangedEvent->iFlags & TWsVisibilityChangedEvent::ENotVisible) {
delete w->d_func()->topData()->backingStore;
w->d_func()->topData()->backingStore = 0;
+ // In order to ensure that any resources used by the window surface
+ // are immediately freed, we flush the WSERV command buffer.
+ S60->wsSession().Flush();
} else if ((visChangedEvent->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible)
&& !w->d_func()->maybeBackingStore()) {
w->d_func()->topData()->backingStore = new QWidgetBackingStore(w);