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>
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();
}
}