Share via


Optimize the Window Display (Compact 7)

3/12/2014

If a device uses both Microsoft Silverlight for Windows Embedded and Win32 for graphics output, we recommend that OEMs and application developers create windows that are optimized for Window Compositor.

When you add Window Compositor to an OS design, Window Compositor renders both Win32 windows and Silverlight for Windows Embedded windows to the display screen by using alpha blending and window composition. You can adjust the composition settings by calling Window Compositor APIs on the window handle (HWND) that you obtain from a call to CreateWindow, CreateWindowEx, or IXRVisualHost::GetContainerHWND.

With alpha blending, Window Compositor composes Silverlight for Windows Embedded and Win32 windows on the display screen by using a visual style that implements semi-transparency in overlapping window regions to improve the visual appearance. Applications can implement alpha blending either on a pixel-by-pixel basis or for an entire window region.

If your application creates windows, you must consider graphics performance in the parts of the application that create and configure windows. To achieve optimum graphics performance, you must disable alpha blending for the following types of windows:

  • Windows for an application such as a shell, which occupy the full screen.
  • Windows that have only animation or movement, such as a video player or full-screen picture viewer.

To remove alpha blending on a pixel-by-pixel basis

To remove alpha blending for an entire window region

  • Call SetWindowOpacity with a value of 255 for the bOpacity parameter to create an opaque window.

For more information about which Windows Embedded Compact APIs to use to configure window composition, see SetWindowOpacity and SetWindowCompositionFlags in the Windows Embedded Compact 7 documentation. For more information about how to add Window Compositor to an OS, see the section Include Compositor in an OS Design in the Window Compositor Developer’s Guide.

See Also

Concepts

Tune Graphics Performance with Window Compositor