This class contains GPE color conversion support. The base ColorConverter class is defined in the Swconvrt.cpp file. This converter enables translation among any combination of source and destination surface pixel types at the time that bit blocks are written to the display.
Pixel formats for surfaces conform to one of the following types:
When display drivers call GPE functions with XLATEOBJ pointer parameters, the functions create and initialize ColorConverter objects to handle any color conversion. Alternatively, based upon the value of the XLATEOBJ member iUniq, the functions may use a cached ColorConverter object from a previous call.
The ColorConverter object populates two pointers: pLookup and pConverter. If both are NULL, no conversion is required because the source and destination formats are compatible and palettes, if any, are identical.
If pLookup is not NULL, the operation must convert each source pixel to a destination pixel, using the source pixel value as an index into the lookup table. If pConverter is not NULL, it is the address of a function that is called to convert a source pixel to a destination pixel. Use this when source and destination formats are incompatible and the source format is not indexed. At most, either pLookup or pConverter is set to non-NULL.
Because color conversion is an optional feature for Windows CE, you can reduce or remove part or all of the feature in order to reduce the size of the driver. However, if you choose to alter the conversion feature, be sure to author all bitmaps provided for the platform to a bit depth or palette that is supported by the display driver. The current size of the complete color converter is slightly over 2 KB when compiled without debugging symbols.