Don't clobber the m_damaged state during rendering.
authorGunnar Sletta <gunnar.sletta@jollamobile.com>
Fri, 24 Jan 2014 13:19:13 +0000 (14:19 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 24 Jan 2014 14:48:32 +0000 (15:48 +0100)
commit7bf752b2b76c3c8f289d03801f2716b27480be67
tree625276dfa01338aa3baa4388447748fb2ef48653
parent4fb6fb6612f1615729965f0515032d86695a86ba
Don't clobber the m_damaged state during rendering.

If the QWaylandSurfaceNode had m_damage during preprocess()
(which it could get if the GUI thread got a surfaceDamaged)
it would call into the item, update its texture and clear its
m_damaged state. This resulted in that the next time we
advanced the buffer queue, the item would not have m_damaged
set and as a result, the texture would not be updated.

Also, the call from preprocess() to updateTexture, though protected by
a mutex in preprocess(), touched a number of variables on the GUI
thread which were not being protected there, such as m_damaged and
smooth().

The QWaylandSurfaceNode was doing this primarily to deal with direct
rendering which has been removed pending a better solution, so we
replace its use with the built-in QSGSimpleTextureNode.

Change-Id: Ifccb6b1149980b4796a182fa8525446a00bbe57f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
src/compositor/compositor_api/compositor_api.pri
src/compositor/compositor_api/qwaylandsurfaceitem.cpp
src/compositor/compositor_api/qwaylandsurfaceitem.h
src/compositor/compositor_api/qwaylandsurfacenode.cpp [deleted file]
src/compositor/compositor_api/qwaylandsurfacenode_p.h [deleted file]