Partager via


Bit Block Transfers and Line Drawing Acceleration (Windows CE 5.0)

Send Feedback

Display drivers do much of their work through 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 most of a display driver's work are block image transfers**(blits) and line drawing:

  • A blit operation transfers a rectangular group of pixels from main or display memory to display memory. Blit operations include drawing rectangles that are filled with solid colors, displaying icons, and displaying cursors.
  • A line drawing operation, for the purposes of acceleration, is limited to drawing straight horizontal or vertical lines. Diagonal lines are not as common in most GUI applications, and are usually not accelerated.

These two types of acceleration can be performed in hardware or software. Hardware acceleration for blits and line drawing are generally faster but are not available in all display hardware.

Even if your display hardware cannot accelerate functions, you might still be able to achieve better performance than the default provided by the GPE classes. For example, you can develop routines that take advantage of specific characteristics of your display hardware to perform blits and draw lines as efficiently as possible.

The capabilities of display hardware vary considerably. Thus, a good display driver takes advantage of any available hardware acceleration. Consider these differences:

  • Simple, low-end display hardware requires that the display driver set every pixel of the display. Low-end hardware cannot accelerate blits or line drawings.
  • Complex, high-end display hardware can directly support complex features, such as rendering Phong-shaded polygons. Display hardware that is more complex can complete rendering tasks much faster than a display driver can perform them in software.

The following list shows the three implementation options for blits and line drawings:

  • You can use the default GPE routines that provide a generic software implementation of BitBlt and line drawing.
  • You can also use the emulated library, which contains software routines that in some cases are more optimized than GPE routines are. The emulated library code is provided so you can customize it for your own device.
  • You can enable hardware acceleration if your display device supports it.

The following topics describe how to support hardware and software acceleration of blit and line drawing operations in your display driver:

See Also

Display Driver Extensions | Display Drivers

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.