diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2012-01-03 09:58:43 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2012-01-05 15:30:19 +0100 |
commit | 5d0a7d01f39efadd9c6b2b4aa744992dd80a550a (patch) | |
tree | 070cc2cb585f381345fc883be89ebcc886ea9ab4 /src/compositor/wayland_wrapper/wlcompositor.cpp | |
parent | 6465813bb51dcf99b76dcca3334c9b11d6cad890 (diff) |
Clear dirty set before sending frame callback.
Previously, markSurfaceAsDirty() would have no effect when triggered
by the frame callback function.
Change-Id: Ife7c40757f1cba10e8cdbfab3d514a1dcdac76db
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper/wlcompositor.cpp')
-rw-r--r-- | src/compositor/wayland_wrapper/wlcompositor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compositor/wayland_wrapper/wlcompositor.cpp b/src/compositor/wayland_wrapper/wlcompositor.cpp index b998c9120..56ac056e1 100644 --- a/src/compositor/wayland_wrapper/wlcompositor.cpp +++ b/src/compositor/wayland_wrapper/wlcompositor.cpp @@ -172,12 +172,13 @@ Compositor::~Compositor() void Compositor::frameFinished(Surface *surface) { if (surface && m_dirty_surfaces.contains(surface)) { + m_dirty_surfaces.remove(surface); surface->sendFrameCallback(); - m_dirty_surfaces.remove(surface); } else if (!surface) { - foreach (Surface *surface, m_dirty_surfaces) + QSet<Surface *> dirty = m_dirty_surfaces; + m_dirty_surfaces.clear(); + foreach (Surface *surface, dirty) surface->sendFrameCallback(); - m_dirty_surfaces.clear(); } } |