From: Paul Olav Tvete Date: Tue, 3 Jan 2012 08:58:43 +0000 (+0100) Subject: Clear dirty set before sending frame callback. X-Git-Tag: qt-v5.0.0-alpha1~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d0a7d01f39efadd9c6b2b4aa744992dd80a550a;p=profile%2Fivi%2Fqtwayland.git 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 Reviewed-by: Jørgen Lind --- diff --git a/src/compositor/wayland_wrapper/wlcompositor.cpp b/src/compositor/wayland_wrapper/wlcompositor.cpp index b998c91..56ac056 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 dirty = m_dirty_surfaces; + m_dirty_surfaces.clear(); + foreach (Surface *surface, dirty) surface->sendFrameCallback(); - m_dirty_surfaces.clear(); } }