Implemented multiple windows and GL context sharing
What was traditionally the QQuickRenderLoop which was used
to support one QQuickCanvas instance has now grown to support
multiple QQuickCanvas instances and is now called
QQuickWindowManager, of which there are two implementations.
QQuickRenderThreadSingleContextWindowManager:
One QSGContext and one OpenGL context is being used to draw
all the windows and we alternate between which surface the gl
context is bound to. This implementation relies on that
swap does not block, but that the graphics pipeline is
vsynced and will eventually block as the buffer queue is
filled up. This is the behavior we get on Mac OS X and
Wayland. The benefit of this implementation is that we have
vsync'ed animations, and the synchronizaiton between GUI and
render thread is simple. (well, simple relative to the
alternative, that is).
QQuickTrivialWindowManager:
One QSGContext and one OpenGL context is being used on the GUI
thread. Animations are ticked from a timer. Performance of this
implementation will deteriorate if the driver is using blocking
swap.
Task-number: QTBUG-19455
Change-Id: Ib961ac7d71eb49c70a057872b7cac020c4d19f3d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 files changed: