3.2.5.1.1.1.9 Processing of MemBlt
The structure and fields of the MemBlt Primary Drawing Order are specified in section 2.2.2.2.1.1.2.9, and the techniques described in section 3.2.5.1.1.1 demonstrate how to decode and process the order.
The source bitmap associated with the MemBlt order MUST reside in one of two possible locations:
If the bitmap cache ID (specified as part of the cacheId field) refers to one of the specified bitmap caches, the actual bitmap data MUST have been received in a Cache Bitmap Secondary Drawing Order (sections 3.2.5.1.2.1.1, 3.2.5.1.2.1.2, and 3.3.5.1.2.1.7). If the cacheIndex field is set to BITMAPCACHE_WAITING_LIST_INDEX (32767), the last bitmap cache entry MUST contain the source bitmap; this implies that the bitmap data was received in a Cache Bitmap (Revision 2) Order, and the CBR2_DO_NOT_CACHE (0x10) flag was set or it was received in a Cache Bitmap (Revision 3) Order, and the CBR3_DO_NOT_CACHE (0x10) flag was set.
However, if the bitmap cache ID is set to TS_BITMAPCACHE_SCREEN_ID (0xFF), the source bitmap resides in the Offscreen Bitmap Cache at the entry location specified by the cacheIndex field. This entry MUST have been created and initialized in response to the processing of prior Create Offscreen Bitmap (see section 3.2.5.1.3.1.1) and Switch Surface (see section 3.2.5.1.3.1.2) Alternate Secondary Drawing Orders; the Create Offscreen Bitmap Order creates the offscreen bitmap while the Switch Surface Order is used to redirect all drawing operations to the offscreen bitmap.