xfreerdp: add support for no-codec bitmaps in X11-GDI
This commit is contained in:
parent
278422aed5
commit
02ea6de9dc
@ -616,7 +616,28 @@ void xf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_c
|
||||
}
|
||||
else if (surface_bits_command->codecID == CODEC_ID_NONE)
|
||||
{
|
||||
XSetFunction(xfi->display, xfi->gc, GXcopy);
|
||||
XSetFillStyle(xfi->display, xfi->gc, FillSolid);
|
||||
|
||||
xfi->bmp_codec_none = (uint8*) xrealloc(xfi->bmp_codec_none,
|
||||
surface_bits_command->width * surface_bits_command->height * 4);
|
||||
|
||||
freerdp_image_invert(surface_bits_command->bitmapData, xfi->bmp_codec_none,
|
||||
surface_bits_command->width, surface_bits_command->height, 32);
|
||||
|
||||
image = XCreateImage(xfi->display, xfi->visual, 24, ZPixmap, 0,
|
||||
(char*) xfi->bmp_codec_none, surface_bits_command->width, surface_bits_command->height, 32, 0);
|
||||
|
||||
XPutImage(xfi->display, xfi->primary, xfi->gc, image, 0, 0,
|
||||
surface_bits_command->destLeft, surface_bits_command->destTop,
|
||||
surface_bits_command->width, surface_bits_command->height);
|
||||
|
||||
XCopyArea(xfi->display, xfi->primary, xfi->window->handle, xfi->gc,
|
||||
surface_bits_command->destLeft, surface_bits_command->destTop,
|
||||
surface_bits_command->width, surface_bits_command->height,
|
||||
surface_bits_command->destLeft, surface_bits_command->destTop);
|
||||
|
||||
XSetClipMask(xfi->display, xfi->gc, None);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -445,6 +445,8 @@ boolean xf_post_connect(freerdp* instance)
|
||||
xfi->image = XCreateImage(xfi->display, xfi->visual, xfi->depth, ZPixmap, 0,
|
||||
(char*) gdi->primary_buffer, gdi->width, gdi->height, xfi->scanline_pad, 0);
|
||||
|
||||
xfi->bmp_codec_none = (uint8*) xmalloc(64 * 64 * 4);
|
||||
|
||||
instance->update->BeginPaint = xf_begin_paint;
|
||||
instance->update->EndPaint = xf_end_paint;
|
||||
instance->update->DesktopResize = xf_desktop_resize;
|
||||
|
@ -91,6 +91,7 @@ struct xf_info
|
||||
XSetWindowAttributes attribs;
|
||||
boolean complex_regions;
|
||||
VIRTUAL_SCREEN vscreen;
|
||||
uint8* bmp_codec_none;
|
||||
void* rfx_context;
|
||||
|
||||
Atom _NET_WM_ICON;
|
||||
|
@ -50,7 +50,8 @@ uint8 CAPSET_TYPE_STRINGS[][32] =
|
||||
"Multifragment Update",
|
||||
"Large Pointer",
|
||||
"Surface Commands",
|
||||
"Bitmap Codecs"
|
||||
"Bitmap Codecs",
|
||||
"Frame Acknowledge"
|
||||
};
|
||||
|
||||
/* CODEC_GUID_REMOTEFX 0x76772F12BD724463AFB3B73C9C6F7886 */
|
||||
@ -974,9 +975,10 @@ void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings)
|
||||
|
||||
void rdp_read_virtual_channel_capability_set(STREAM* s, rdpSettings* settings)
|
||||
{
|
||||
uint32 flags;
|
||||
uint32 VCChunkSize;
|
||||
|
||||
stream_seek_uint32(s); /* flags (4 bytes) */
|
||||
stream_read_uint32(s, flags); /* flags (4 bytes) */
|
||||
stream_read_uint32(s, VCChunkSize); /* VCChunkSize (4 bytes) */
|
||||
|
||||
if (!settings->server_mode)
|
||||
@ -1648,7 +1650,7 @@ boolean rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 number
|
||||
}
|
||||
|
||||
if (s->p != em)
|
||||
printf("incorrect offset, type:%d actual:%d expected:%d\n",
|
||||
printf("incorrect offset, type:0x%02X actual:%d expected:%d\n",
|
||||
type, (int) (s->p - bm), (int) (em - bm));
|
||||
|
||||
stream_set_mark(s, em);
|
||||
|
Loading…
Reference in New Issue
Block a user