part of merge, composite, out_uint8s fixes

ulab-next
Jay Sorg 11 years ago
parent a1b4baddc6
commit f5fddc1a57

@ -454,10 +454,7 @@ rdpRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor,
Bool displayed); Bool displayed);
/* rdpglyph.c */ /* rdpglyph.c */
void /* look in rdpglyph.h */
rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int nlists, GlyphListPtr lists, GlyphPtr* glyphs);
/* rdpComposite.c */ /* rdpComposite.c */
int int
@ -468,11 +465,6 @@ void
rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst,
INT16 yDst, CARD16 width, CARD16 height); INT16 yDst, CARD16 width, CARD16 height);
void
rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat,
INT16 xSrc, INT16 ySrc, int nlists, GlyphListPtr lists,
GlyphPtr* glyphs);
/* rdpinput.c */ /* rdpinput.c */
int int
@ -668,6 +660,13 @@ struct stream
} }
#endif #endif
/******************************************************************************/
#define out_uint8(s, v) \
{ \
*((s)->p) = (unsigned char)((v) >> 0); \
(s)->p++; \
}
/******************************************************************************/ /******************************************************************************/
#define init_stream(s, v) \ #define init_stream(s, v) \
{ \ { \

@ -819,7 +819,8 @@ rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
{ {
PictureScreenPtr ps; PictureScreenPtr ps;
LLOGLN(0, ("rdpGlyphs: op %d xSrc %d ySrc %d maskFormat %p", op, xSrc, ySrc, maskFormat)); LLOGLN(10, ("rdpGlyphs: op %d xSrc %d ySrc %d maskFormat %p",
op, xSrc, ySrc, maskFormat));
if (g_do_glyph_cache && rdpGlyphCheck(nlists, lists, glyphs)) if (g_do_glyph_cache && rdpGlyphCheck(nlists, lists, glyphs))
{ {
@ -843,7 +844,7 @@ rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
rdpup_set_hints(0, 1); rdpup_set_hints(0, 1);
} }
g_doing_font = 0; g_doing_font = 0;
LLOGLN(0, ("rdpGlyphs: out")); LLOGLN(10, ("rdpGlyphs: out"));
} }
/******************************************************************************/ /******************************************************************************/

@ -132,6 +132,7 @@ rdpup_disconnect(void)
{ {
int index; int index;
LLOGLN(0, ("rdpup_disconnect:"));
RemoveEnabledDevice(g_sck); RemoveEnabledDevice(g_sck);
g_connected = 0; g_connected = 0;
g_tcp_close(g_sck); g_tcp_close(g_sck);
@ -293,12 +294,14 @@ rdpup_send(char *data, int len)
} }
else else
{ {
LLOGLN(0, ("rdpup_send: g_tcp_send failed(returned -1)"));
rdpup_disconnect(); rdpup_disconnect();
return 1; return 1;
} }
} }
else if (sent == 0) else if (sent == 0)
{ {
LLOGLN(0, ("rdpup_send: g_tcp_send failed(returned zero)"));
rdpup_disconnect(); rdpup_disconnect();
return 1; return 1;
} }
@ -425,12 +428,14 @@ rdpup_recv(char *data, int len)
} }
else else
{ {
LLOGLN(0, ("rdpup_recv: g_tcp_recv failed(returned -1)"));
rdpup_disconnect(); rdpup_disconnect();
return 1; return 1;
} }
} }
else if (rcvd == 0) else if (rcvd == 0)
{ {
LLOGLN(0, ("rdpup_recv: g_tcp_recv failed(returned 0)"));
rdpup_disconnect(); rdpup_disconnect();
return 1; return 1;
} }
@ -1507,7 +1512,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_uint8s(g_out_s, bpp); out_uint8(g_out_s, bpp);
} }
return 0; return 0;
} }
@ -1857,7 +1862,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_uint8s(g_out_s, 8); out_uint8(g_out_s, 8);
lx += 64; lx += 64;
} }
ly += 64; ly += 64;
@ -2465,7 +2470,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_uint8s(g_out_s, srcrepeat); out_uint8(g_out_s, srcrepeat);
if (srctransform == 0) if (srctransform == 0)
{ {
out_uint8s(g_out_s, 10 * 4); out_uint8s(g_out_s, 10 * 4);
@ -2483,12 +2488,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_uint8s(g_out_s, mskflags); out_uint8(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_uint8s(g_out_s, mskrepeat); out_uint8(g_out_s, mskrepeat);
out_uint8s(g_out_s, op); out_uint8(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