Search by Tags

Bitblt

 
Applicable for

Compare with Revision


Subscribe for this article updates

A frequent task of the display driver is to copy data form one location to another e.g. from a bitmap to the framebuffer. This copy operation is called a Blit. In a typical graphics application, blit operations can take a huge amount of the available CPU and memory bandwidth, therefore it is worth optimizing it.

Depending on the configuration, a blit can be a simple memory copy, or require complex color transformations. The best situation is if the source and destination are in the VideoRAM. In this case it is possible for the display driver to utilize hardware acceleration if available. In the VideoRAM only the color format of the framebuffer is allowed.

In case you can't have your bitmaps in the VideoRAM you should at least try to use the same color format for source and destination. If this is impossible try to use one of the formats which are optimized. See the table below for more information.

Fast Blit operations

Source FormatDestination FromatComment
32bit 88832bit 888 (32BPP, 24LDD) Very fast (no conversion required, 24LDD mode not supported by all modules)
24bit 66624bit 666 (default framebuffer format)Very fast (no conversion required)
24bit 88824bit 666 (default framebuffer format)
16bit 565(24bit 666 default framebuffer format)
16bit 155516bit 1555 (16BPP,18LDD)Very fast (no conversion required)
16bit 56524bit 1555 (16BPP,18LDD)
16bit 56516bit 565 (16BPP,16LDD)Very fast (no conversion required)

See also