Compartilhar via


Software Emulation

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Note

Software emulation is an optional capability of Windows Embedded CE. Some devices may not support it. Check the manufacturer's documentation for more details.

When the hardware does not support some functionality through the hardware abstraction layer (HAL), DirectDraw attempts to emulate it.

This emulated functionality is provided through the hardware emulation layer (HEL). Your OS design must have a DirectDraw-enabled driver to support HEL functionality. The HEL presents its capabilities to DirectDraw just as the HAL would.

As with the HAL, applications never work directly with the HEL. The result is transparent support for almost all major capabilities, regardless of whether a given capability is supported by hardware or through the HEL.

Obviously, software emulation cannot equal the performance that hardware support provide. You can query for the capabilities that the hardware supports by using the IDirectDraw::GetCaps method.

By examining these capabilities during application initialization, you can adjust application parameters to provide optimum performance over varying levels of hardware performance.

The HEL is capable of supporting 8, 16, 24, and 32 bpp surfaces with a variety of different bit masks.

In some cases, certain combinations of hardware-supported capabilities and emulation can result in slower performance than emulation alone.

For example, if the display device driver supports DirectDraw but not stretch blitting, noticeable performance losses will occur when stretch blitting from video memory surfaces. This happens because video memory is often slower than system memory, forcing the CPU to wait when accessing video memory surfaces.

If your application uses a capability that is not supported by the hardware, it is sometimes best to create surfaces in system memory, thereby avoiding performance losses created when the CPU accesses video memory.

For more information, see Hardware Abstraction Layer.