Improving the Performance of Software Blits by Generating Blit Functions at Run Time (Windows Embedded CE 6.0)

1/6/2010

You can improve the performance of software blits by generating the blitting functions at run time. Each blitting function is generated in a microprocessor-independent p-code and then translated into machine language before the blit function is executed. To improve performance of individual blit functions, the translated microprocessor-dependent code is stored in a cache. If a function in the cache is used often enough, you can implement additional optimizations to further increase performance.

To generate software blits at run time, you must implement the microprocessor-specific translation function and optimization function. You can further customize and optimize these functions for a specific microprocessor to increase software blit performance. To retrieve the translation and optimization functions, you use the GenBltCpuInitialize function.

The following table shows source files that you can use while implementing the GenBlitCpuInitialize function, the optimization function, and the translation function.

File name under %_WINCEROOT%\Public\Common\OAK Description

Inc\Genblt.h

Contains definitions and declarations for programming elements relevant to generating blits at run time, which includes the definitions for the optimization function and the translation function.

Inc\Genblt_pcode.h

Contains the definition of the p-code language and the macros and functions for common tasks.

Cpulibs\Common\Genblt_cpu\Pcvm.cpp

Contains the p-code virtual machine. Use the p-code virtual machine as a definition for the behavior of each p-code instruction.

Cpulibs\i486\Genblt_cpu\Genblt_x86.cpp

Contains GenBltCpuInitialize for x86-based hardware platforms.

Cpulibs\i486\Genblt_cpu\Trans_x86.cpp

Contains the translator for translating generic x86 p-code to machine code.

Cpulibs\ARM\Genblt_cpu\Genblt_arm.cpp

Contains GenBltCpuInitialize for ARMV4-based systems.

See Also

Concepts

Display Driver Performance
Implementing the GenBltCpuInitialize Function
Implementing the Translation Function
Implementing the Optimization Function