summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_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/qwidget_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/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 00f2213..0ce7534 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1195,6 +1195,10 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
if (destroyWindow) {
delete id;
+ // At this point the backing store should already be destroyed
+ // so we flush the command buffer to ensure that the freeing of
+ // those resources and deleting the window can happen "atomically"
+ S60->wsSession().Flush();
}
}