3.3.5.1 Processing an RDPGFX_WIRE_TO_SURFACE_PDU_1 message

The structure and fields of the RDPGFX_WIRE_TO_SURFACE_PDU_1 message are specified in section 2.2.2.1. The header field MUST be processed as specified in section 3.1.5.1. The surfaceId field MUST identify a valid offscreen surface in the Offscreen Surface (section 3.3.1.6) ADM element, and the size of the bitmap data specified in the bitmapDataLength field MUST be consistent with the amount of data read from the "Microsoft::Windows::RDS::Graphics" dynamic virtual channel (section 2.1). Once the data in the bitmapData field has been decoded as specified by the encoding type enumerated in the codecId field, the bitmap MUST be copied to the target surface.

If the encoding type enumerated in the codecId field is not RDPGFX_CODECID_ALPHA (0x000C):

  • If the target surface is listed in the Surface to Window Mapping (section 3.3.1.15) ADM element, then the alpha channel of the bitmap (if present) MUST be ignored when copying to the target surface, while the red, green, and blue channels MUST all be copied to the target surface without modification.

  • If the target surface is not listed in the Surface to Window Mapping ADM element, then only the red, green, and blue channels SHOULD be copied to the target surface.

If the encoding type enumerated in the codecId field is RDPGFX_CODECID_ALPHA:

  • Only the alpha channel of the target surface MUST be updated with the contents of the source bitmap (the red, green, and blue channels of the target surface MUST NOT be changed).