Microsoft Windows CE 3.0  

Accelerating Bit Block Transfers and Line Drawing

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Display drivers do much of their work by means of a few basic operations. Thus, if you make those operations faster, you greatly improve the overall performance of your display driver. The operations that account for the bulk of a display driver's work are bit block transfers (blits) and line drawing. Any operation that transfers a rectangular group of pixels from main memory to display memory is a blit. Such operations include drawing rectangles that are filled with solid colors, displaying icons, and displaying cursors. Line drawing, for the purposes of acceleration, is limited to drawing straight lines, and usually only horizontal or vertical ones. Diagonal lines are far rarer in most GUI applications, and as such are usually not accelerated.

These types of acceleration can be done either in hardware or in software. Hardware acceleration for blits and line drawing is generally faster but is not available in all display hardware. However, even if your display hardware cannot accelerate the functions, you may still be able to achieve better performance than the default provided by the GPE classes. For example, you can write routines that take advantage of the specific characteristics of your display hardware to perform blits and draw lines as efficiently as possible.

The capabilities of display hardware vary considerably. Simple low-end display hardware requires that every pixel of the display be set by the display driver. Such hardware cannot accelerate blits or line drawing. Complex, high-end display hardware can directly support such complex features as rendering phong-shaded polygons. Display hardware that is more complex can effectively complete rendering tasks much faster than a display driver can perform them in software. Thus, a good display driver will take advantage of any available hardware acceleration.

The following sections describe how to support both hardware and software acceleration of blit and line drawing operations in your display driver. The Microsoft Windows CE Platform Builder includes sample display drivers that illustrate both hardware and software acceleration for blit and line operations.



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.