Optimize OS Components for Graphics Performance (Compact 7)
3/12/2014
To improve graphics performance, you can optimize components in the Windows Embedded Compact operating system that affect UI load time and animation frame rate.
Adding Support for Hardware Acceleration to the OS
Hardware acceleration for Microsoft Silverlight for Windows Embedded caches rendered UI elements in graphics memory, which consumes more memory but results in better graphics performance.
Hardware acceleration is a requirement for supporting the OpenGL ES or DirectDraw graphics renderer, and for supporting bitmap caching. When you implement hardware acceleration, you can help improve both load time and animation frame rate.
For more information about how to implement hardware acceleration, see Implement Hardware Acceleration for Graphics in Silverlight for Windows Embedded [Reference].
Customizing the Implementation of the Graphics Renderer (Optional)
By using cached composition and hardware-accelerated graphics, you can improve graphics processing speed, which helps improve graphics performance. When you add support for hardware acceleration to an OS, you must add a graphics renderer, either OpenGL or DirectDraw, to the OS image.
You can optionally customize the graphics renderer source code to optimize graphics performance for your device hardware.
For example, you can remove specific graphics operations from the code that occur at a specific stage in the graphics pipeline, and then test the UI to determine whether the performance metrics improve.
For steps on how to customize the graphics renderer, see Step 2 through Step 4 in Implement Hardware Acceleration for Graphics in Silverlight for Windows Embedded [Reference].
After you rebuild the C++ code for the graphics renderer and rebuild the OS image, you can rerun the Silverlight for Windows Embedded Performance tests and determine whether the performance metrics have improved. For more information, see Test the Shell and Applications to Gather Performance Data earlier in this document.
For more information about tuning graphics performance in OpenGL code, see Tuning Your OpenGL Application.
Tuning Performance of the Window Compositor
The Window Compositor displays windows on a device screen by using alpha blending. To implement alpha blending, the Window Compositor first draws each window to a back-buffer surface in memory. Then, it aggregates those surfaces and composes them on a single back-buffer surface. Finally, it displays the windows on the screen.
By using this rendering process, the Window Compositor provides alpha blending, which improves the visual appearance of windows. However, alpha blending can impact graphics performance.
Developers should consider both the benefits of an improved visual appearance and the potential drawbacks of graphics performance when deciding whether to include the Window Compositor (SYSGEN_COMPOSITION). For example, if the UI cannot display several windows at the same time, you might not have to include the Windows Compositor.
When an OS design includes the Window Compositor, developers should follow the programming guidelines for improving its graphics performance. For more information, see Tune Graphics Performance with Window Compositor.
See Also
Concepts
Graphics and Performance in Silverlight for Windows Embedded