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]
|
Did this document help you? |
Yes: Tell us what works for you.
|
|
|