Why use Composition Manager?

Why should you use Composition Manager to create your HMI?

First, lets talk about the HMI that you are about to create. Will your HMI use only simple two-dimensional Flash animation, and will it require very little in the way of processing power or complex graphical operations? If so, then you probably don't need to use Composition Manager. But lets say that your application will use multiple processes and need to operate reliably in a safety-critical environment. You're planning on using the Flash player to provide a stylish UI. You're using complicated, three-dimensional, processor-intensive animations, and you're running a Web browser or perhaps a third-party flash application inside your HMI. You're probably also using transparency effects or maybe your HMI requires some complex redraws or rotations.

If any the above is true, then Composition Manager is probably for you.

The Composition Manager allows you to create an HMI using multiple processes and multiple graphic rendering engines. There are many advantages to creating HMIs using multiple processes including:

Advantages of using multiple processes

Reuse of existing assets
You can design your main HMI using a single tool, such as Flash. You can include your own animations in your application, or reuse existing third-party applications such as a browsers, or maps.
Combining multiple graphic technologies
You can combine multiple graphic rendering engines to take advantage of the strengths of each platform. Flash is a simple, easy to use language that allows you to quickly create stylish HMIs. For more complicated graphics development, you can use the Native APIs like Open GL ES and Open VG. The native graphics APIs provide better performance than animations that are created in Flash. You can even combine 2D and 3D graphics engines into a single HMI.
Abstraction of safety-critical processes
By using multple processes, you can isolate safety-critical processes from general HMI functionality. This allows you to validate system performance, and to ensure that your application will function in a reliable, predictable manner.
Abstraction of computationally-intensive processes
You can isolate expensive processes from basic HMI code. For example, you can use native code to create an indicator service, which provides temporal cues and feedback to the user whenever a slow process occurs. You can even run processes as separate threads. This allows you to set priority levels to ensure that your application utlizes system resources in order to execute in an expected, timely manner.
Isolation of untrusted processes
You can isolate potentially dangerous code by running untrusted processes within a sandbox.

You can use the Composition Manager to seamlessly combine multiple graphic processes into a single HMI. At runtime, animations and video output are sent to an offscreen buffer. These offscreen buffers are not displayed, and are instead used as a staging area for animation. At display time, when an application requests it, the Composition Manager combines multiple offscreen buffers into a single image. This image is then displayed by the device driver. Offscreen buffers can be combined without changing the rendering application. At display time, you can define how buffers are displayed by zooming in or out, scaling, or rotating image data. You can also apply transparency effects (alpha blending or chroma key) to image data at display time.

This flexibility allows the HMI to take over the compositing of a subprocess window, where a subprocess is one of the graphical processes that combine together to make up your application. Using Composition Manager, the HMI can take control of the application's rendering surfaces. For example, the main HMI can use simple, standards-based APIs to take control of a browser application running as a subprocess. The main HMI can define the window size and display properties of the subprocess, to ensure that the browser appears properly in the main HMI window and that any content in the browser window is rendered properly to the display.

The following figure shows two simple processes that are composited at display time. On the left, the simple Flash HMI contains controls that can be used to view the animation and a viewing window to contain an animation. On the right, the three-dimensional gears animation is combined with the HMI to create the complete application.


Compositing a simple HMI


Compositing a simple HMI

Is Composition Manager right for you?

So now get how composition works, but how do you know if Composition Manager is right for your application? The Composition Manager is scalable, meaning that you can set the level of composition depending on the needs of your application. At the most basic level, the Composition Manager uses software-only composition. This is suitable for simple composition tasks. At the intermediate level, when supported by a device driver, the Composition Manager can take advantage of layering. Some video cards support multiple layers, and multiple buffers. You can write to each layer, then combine the layers at display time.

Finally, for applications that require complex graphical operations, you can use hardware accelerated options such as OpenGL ES, Open VG, or bit-blitting hardware.