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

This commit is contained in:
Jim Grandy 2013-07-08 16:22:38 -07:00
parent e820488e54
commit 504fad026e
2 changed files with 8 additions and 67 deletions

View File

@ -1084,65 +1084,6 @@ xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv)
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 > 1) && (height > 1) && (priv->kind_width > 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);
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
rdpCreateWindow(WindowPtr pWindow)
@ -1480,7 +1421,7 @@ rdpClearToBackground(WindowPtr pWin, int x, int y, int w, int h,
if (g_do_dirty_ons)
{
draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL);
draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL, 16);
}
else
{
@ -1518,7 +1459,7 @@ rdpRestoreAreas(WindowPtr pWin, RegionPtr prgnExposed)
if (g_do_dirty_ons)
{
draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL);
draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL, 16);
}
else
{

View File

@ -1507,7 +1507,7 @@ rdpup_create_os_surface_bpp(int rdpindex, int width, int height, int bpp)
out_uint32_le(g_out_s, rdpindex);
out_uint16_le(g_out_s, width);
out_uint16_le(g_out_s, height);
out_uint8(g_out_s, bpp);
out_uint8s(g_out_s, bpp);
}
return 0;
}
@ -1857,7 +1857,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, 0);
out_uint16_le(g_out_s, 0);
out_uint8(g_out_s, 8);
out_uint8s(g_out_s, 8);
lx += 64;
}
ly += 64;
@ -2465,7 +2465,7 @@ rdpup_composite(short srcidx, int srcformat, short srcwidth, CARD8 srcrepeat,
out_uint16_le(g_out_s, srcidx);
out_uint32_le(g_out_s, srcformat);
out_uint16_le(g_out_s, srcwidth);
out_uint8(g_out_s, srcrepeat);
out_uint8s(g_out_s, srcrepeat);
if (srctransform == 0)
{
out_uint8s(g_out_s, 10 * 4);
@ -2483,12 +2483,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][2]);
}
out_uint8(g_out_s, mskflags);
out_uint8s(g_out_s, mskflags);
out_uint16_le(g_out_s, mskidx);
out_uint32_le(g_out_s, mskformat);
out_uint16_le(g_out_s, mskwidth);
out_uint8(g_out_s, mskrepeat);
out_uint8(g_out_s, op);
out_uint8s(g_out_s, mskrepeat);
out_uint8s(g_out_s, op);
out_uint16_le(g_out_s, srcx);
out_uint16_le(g_out_s, srcy);
out_uint16_le(g_out_s, mskx);