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:
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.
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.