Accelerating Bit Block Transfers and Line Drawing

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.

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 display hardware requires that every pixel of the display b set by the display driver. Such hardware cannot accelerate blits or line drawing. Display hardware that is more complex can effectively complete those tasks much faster than a display driver can.

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