Ubuntu 6591 Published by

Canonical has posted a demo video of the new Unity 8 Mir Compositor



This video shows a practical application of using the Qt scenegraph rendering engine as a Mir compositor, allowing us to mix QML items with live Mir surfaces seamlessly in one scene.

In this case, we demo the unity8 shell, where live surfaces are incorporated into the QML scene and are animated and transformed by Qt scenegraph renderer.

This demo uses Mir to abstract away the underlying hardware specifics, set up the display and GL context for Qt to do the rendering. Mir delivers all input events to Qt's event handling system, and manages clients connections and surfaces.

Those Mir surfaces are represented in the QML scene as a MirSurface item which can be manipulated by QML like any other native item: positioning, transformations and animations all just work. Qt decides the destination for input events, does the right transformation and hands them back to Mir to deliver to the client.

Credits for the demo work (on top of trunk Mir & Unity8): Daniel d'Andrada & Gerry Boland

Notes:
- I later noticed that I had quite a bit of output going to the terminals, and that takes its toll on the FPS
- In production code we suspend unfocused applications. But for demo purposes I've disabled that in order to emphasize that the animations are dealing with the actual live mir surfaces and not with screenshots of them.