From 201fdfd8816116a06b5c5560cf950bad80caa4e4 Mon Sep 17 00:00:00 2001 From: Matt Hortman Date: Thu, 23 Feb 2012 15:38:17 -0500 Subject: [PATCH] added raster operations --- protocols/rdp/src/rdp_gdi.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/protocols/rdp/src/rdp_gdi.c b/protocols/rdp/src/rdp_gdi.c index 30b4db24..76887181 100755 --- a/protocols/rdp/src/rdp_gdi.c +++ b/protocols/rdp/src/rdp_gdi.c @@ -73,11 +73,23 @@ void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) { guac_socket* socket = client->socket; guac_rdp_bitmap* bitmap = (guac_rdp_bitmap*) memblt->bitmap; + guac_composite_mode cmode = GUAC_COMP_OVER; + + if (memblt->bRop == 204) cmode = GUAC_COMP_OVER; + else if (memblt->bRop == 238) cmode = GUAC_COMP_OR; + else if (memblt->bRop == 136) cmode = GUAC_COMP_AND; + else if (memblt->bRop == 102) cmode = GUAC_COMP_XOR2; + else if (memblt->bRop == 187) cmode = GUAC_COMP_NOR; + else + { + guac_client_log_info (client, "guac_rdp_gdi_memblt: UNSUPPORTED opcode = %d (0x%02X)", memblt->bRop, memblt->bRop); + } + if (bitmap->layer != NULL) guac_protocol_send_copy(socket, bitmap->layer, memblt->nXSrc, memblt->nYSrc, memblt->nWidth, memblt->nHeight, - GUAC_COMP_OVER, + cmode, current_layer, memblt->nLeftRect, memblt->nTopRect); }