|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
This method, which is called prior to a sequence of clipped blit operations, identifies the appropriate functions needed to perform individual blits.
SCODE GPE::BltPrepare( GPEBltParms * pBltParms );
S_OK indicates success.
The following code example shows the simplest acceptable implementation for GPE::BltPrepare.
pBltParms->pBlt = EmulatedBlt; return S_OK;
This action causes the emulated blit function provided with GPE to be used for blit operations.
For improved performance, the BltPreparemethod can examine the characteristics of the blit and the associated surfaces defined in GPEBltParmsto determine whether an accelerated form of the blit is used. The following code example shows how to determine the operations that are likely to be implemented in hardware.
if( pBltParms->pDst->InVideoMemory() && pBltParms->rop4 == 0x0000 ) // This is a fill of BLACKNESS in video memory. if( pBltParms->pDst->InVideoMemory() && pBltParms->rop4 == 0xFFFF ) // This is a fill of WHITENESS in video memory. if( pBltParms->pDst->InVideoMemory() && pBltParms->rop4 == 0xF0F0 && pBltParms->solidColor != 0xFFFFFFFF ) // This is a fill of a solid color in video memory. if( pBltParms->pDst->InVideoMemory() && pBltParms->pSrc->InVideoMemory() && pBltParms->rop4 == 0xCCCC && !pBltParms->pLookup && !pBltParms->pConvert ) // This is a source copy (SRCCOPY) between two surfaces, both in // video memory, with no color translation.
To accelerate these types of blit, BltPrepareplaces the address of the accelerated function in the pBltmember of the GPEBltParmsstructure, instead of the pointer to the EmulatedBltfunction. For operations such as solid color fills, the driver can prepare the hardware. For example, the driver can place a solid color into the appropriate register of the hardware. This eliminates the need to repeat the same action in every call to the accelerated blit handler.
|Runs on||Versions||Defined in||Include||Link to|
|Windows CE OS||1.0 and later|
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004