rdpup: use out_uint8s instead of out_uint8; rdpdraw.c: resolve bad merge with rdp_is_os, and use a temporary value as final parameter to draw_item_add_img_region

ulab-next
Jim Grandy 12 years ago
parent 648470afa1
commit d2d22043aa

@ -1090,66 +1090,6 @@ xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv)
return 1; return 1;
} }
/*****************************************************************************/
int
xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv)
{
RegionRec reg1;
BoxRec box;
int width;
int height;
struct image_data id;
if (!XRDP_IS_OS(priv))
{
width = pix->drawable.width;
height = pix->drawable.height;
if ((pix->usage_hint == 0) &&
(pix->drawable.depth >= g_rdpScreen.depth) &&
(width > 0) && (height > 0) && (priv->kind_width > 0) &&
(priv->is_scratch == 0))
{
LLOGLN(10, ("%d %d", priv->kind_width, pix->drawable.width));
priv->rdpindex = rdpup_add_os_bitmap(pix, priv);
if (priv->rdpindex >= 0)
{
priv->status = 1;
rdpup_create_os_surface(priv->rdpindex,
priv->kind_width, height);
box.x1 = 0;
box.y1 = 0;
box.x2 = width;
box.y2 = height;
if (g_do_dirty_os)
{
if (priv->con_number != g_con_number)
{
draw_item_remove_all(priv);
RegionInit(&reg1, &box, 0);
draw_item_add_img_region(priv, &reg1, GXcopy, RDI_IMGLL, 16);
RegionUninit(&reg1);
priv->is_dirty = 1;
priv->con_number = g_con_number;
}
}
else
{
rdpup_get_pixmap_image_rect(pix, &id);
rdpup_switch_os_surface(priv->rdpindex);
rdpup_begin_update();
rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1,
box.y2 - box.y1);
rdpup_end_update();
rdpup_switch_os_surface(-1);
}
return 1;
}
}
return 0;
}
return 1;
}
/******************************************************************************/ /******************************************************************************/
Bool Bool
rdpCreateWindow(WindowPtr pWindow) rdpCreateWindow(WindowPtr pWindow)

@ -1508,7 +1508,7 @@ rdpup_create_os_surface_bpp(int rdpindex, int width, int height, int bpp)
out_uint32_le(g_out_s, rdpindex); out_uint32_le(g_out_s, rdpindex);
out_uint16_le(g_out_s, width); out_uint16_le(g_out_s, width);
out_uint16_le(g_out_s, height); out_uint16_le(g_out_s, height);
out_uint8(g_out_s, bpp); out_uint8s(g_out_s, bpp);
} }
return 0; return 0;
} }
@ -1858,7 +1858,7 @@ rdpup_send_alpha_area(struct image_data* id, int x, int y, int w, int h)
out_uint16_le(g_out_s, lh); out_uint16_le(g_out_s, lh);
out_uint16_le(g_out_s, 0); out_uint16_le(g_out_s, 0);
out_uint16_le(g_out_s, 0); out_uint16_le(g_out_s, 0);
out_uint8(g_out_s, 8); out_uint8s(g_out_s, 8);
lx += 64; lx += 64;
} }
ly += 64; ly += 64;
@ -2466,7 +2466,7 @@ rdpup_composite(short srcidx, int srcformat, short srcwidth, CARD8 srcrepeat,
out_uint16_le(g_out_s, srcidx); out_uint16_le(g_out_s, srcidx);
out_uint32_le(g_out_s, srcformat); out_uint32_le(g_out_s, srcformat);
out_uint16_le(g_out_s, srcwidth); out_uint16_le(g_out_s, srcwidth);
out_uint8(g_out_s, srcrepeat); out_uint8s(g_out_s, srcrepeat);
if (srctransform == 0) if (srctransform == 0)
{ {
out_uint8s(g_out_s, 10 * 4); out_uint8s(g_out_s, 10 * 4);
@ -2484,12 +2484,12 @@ rdpup_composite(short srcidx, int srcformat, short srcwidth, CARD8 srcrepeat,
out_uint32_le(g_out_s, srctransform->matrix[2][1]); out_uint32_le(g_out_s, srctransform->matrix[2][1]);
out_uint32_le(g_out_s, srctransform->matrix[2][2]); out_uint32_le(g_out_s, srctransform->matrix[2][2]);
} }
out_uint8(g_out_s, mskflags); out_uint8s(g_out_s, mskflags);
out_uint16_le(g_out_s, mskidx); out_uint16_le(g_out_s, mskidx);
out_uint32_le(g_out_s, mskformat); out_uint32_le(g_out_s, mskformat);
out_uint16_le(g_out_s, mskwidth); out_uint16_le(g_out_s, mskwidth);
out_uint8(g_out_s, mskrepeat); out_uint8s(g_out_s, mskrepeat);
out_uint8(g_out_s, op); out_uint8s(g_out_s, op);
out_uint16_le(g_out_s, srcx); out_uint16_le(g_out_s, srcx);
out_uint16_le(g_out_s, srcy); out_uint16_le(g_out_s, srcy);
out_uint16_le(g_out_s, mskx); out_uint16_le(g_out_s, mskx);

Loading…
Cancel
Save