Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Native QuickDraw Hardware Acceleration notSrcCopy Blits


Q: How does Native QuickDraw (NQD) Hardware Acceleration (HWA) handle notSrcCopy Blits?

A: NQD HWA handler routes all notSrcCopy blits to the appropriate hardware accelerated blitter as described below.

The key to understanding the notSrcCopy blit is to realize that QuickDraw will do one of three things based on color depth and color table matching:

  • If color depths (and color tables in case of 8 bits per pixel color) match, the blit will be sent to bit blit function for direct blitting.

  • If color depths (or color tables) do not match and the source is 16 bits per pixel or greater, the blit will be sent to the scale blit function with the mode indicating notSrcCopy. Additionally, bMustScale will be set to 0 and the scaleTable will be invalid (do not assume it will be NULL). In this case, the accelerator developer should apply standard color QuickDraw rules for notSrcCopy to the source, generating the appropriate destination color (using the inverse color table if required for 8 bits per pixel destinations).

  • If color depths (or color tables) do not match and the source is 8 bits per pixel or less, the blit will be sent to the scale blit function with the mode indicating srcCopy. Additionally, bMustScale will be 1 and the scaleTable will be valid. The scale table will have 2 elements for 1-bit sources and 256 elements for 8 bits per pixel sources. Each element will contain the color or index (in destination bit depth) into which each source index should map. For 16 and 32 bits per pixel destinations, the alpha bits will be zeroed (that is, 0x7FF and 0x00FFFFFF for white for 16 and 32 bits per pixel respectively). In this case, the blitter can use this mapping to directly map source to destination pixels.


Note:
In all modes it was observed that the scaleTableIsRGBTable field was always 0. Use bMustScale to determine whether or not to use the scaleTable pointer and assume each entry in the scale table will be an RGB color or a color index as appropriate for the destination bit depth.


[Jun 28 1999]