Don't swap buffers before the window is exposed.
Don't swap buffers before the window is exposed.

At app startup there is often a delay between setting
a window visible and the window being exposed by the
window manager.

Add check to canvas->isExposed() before calling
swapbuffers.

Change-Id: I5e588ab334a72c4fe817da44eff4c3dc785d6b1f
Reviewed-by: Robin Burchell <41fa8c01b8373871178bcfb6b86ab6472317e8dc@viroteck.net>
Reviewed-by: Gunnar Sletta <d0b71651f3efaa9fda200bbcc395b7b82a871fdd@nokia.com>

mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,corngood/qtdeclarative,qmlc/qtdeclarative,corngood/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,jfaust/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,jfaust/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,corngood/qtdeclarative,corngood/qtdeclarative,mgrunditz/qtdeclarative-2d,crobertd/qtdeclarative,crobertd/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,jfaust/qtdeclarative,jfaust/qtdeclarative,qmlc/qtdeclarative,jfaust/qtdeclarative,corngood/qtdeclarative,mgrunditz/qtdeclarative-2d,jfaust/qtdeclarative,crobertd/qtdeclarative,crobertd/qtdeclarative,crobertd/qtdeclarative,mgrunditz/qtdeclarative-2d,crobertd/qtdeclarative,corngood/qtdeclarative,corngood/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,crobertd/qtdeclarative