minor draw_text optimize
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@280 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
c439e6cfcc
commit
e670606f4d
14
xwin.c
14
xwin.c
@ -78,6 +78,11 @@ PropMotifWmHints;
|
|||||||
XFillRectangle(display, backstore, gc, x, y, cx, cy); \
|
XFillRectangle(display, backstore, gc, x, y, cx, cy); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define FILL_RECTANGLE_FAST(x,y,cx,cy)\
|
||||||
|
{ \
|
||||||
|
XFillRectangle(display, ownbackstore ? backstore : wnd, gc, x, y, cx, cy); \
|
||||||
|
}
|
||||||
|
|
||||||
/* colour maps */
|
/* colour maps */
|
||||||
BOOL owncolmap = False;
|
BOOL owncolmap = False;
|
||||||
static Colormap xcolmap;
|
static Colormap xcolmap;
|
||||||
@ -1184,10 +1189,7 @@ ui_draw_glyph(int mixmode,
|
|||||||
XSetStipple(display, gc, (Pixmap) glyph);
|
XSetStipple(display, gc, (Pixmap) glyph);
|
||||||
XSetTSOrigin(display, gc, x, y);
|
XSetTSOrigin(display, gc, x, y);
|
||||||
|
|
||||||
if (ownbackstore)
|
FILL_RECTANGLE_FAST(x, y, cx, cy);
|
||||||
XFillRectangle(display, backstore, gc, x, y, cx, cy);
|
|
||||||
else
|
|
||||||
XFillRectangle(display, wnd, gc, x, y, cx, cy);
|
|
||||||
|
|
||||||
XSetFillStyle(display, gc, FillSolid);
|
XSetFillStyle(display, gc, FillSolid);
|
||||||
}
|
}
|
||||||
@ -1239,11 +1241,11 @@ ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y,
|
|||||||
|
|
||||||
if (boxcx > 1)
|
if (boxcx > 1)
|
||||||
{
|
{
|
||||||
FILL_RECTANGLE(boxx, boxy, boxcx, boxcy);
|
FILL_RECTANGLE_FAST(boxx, boxy, boxcx, boxcy);
|
||||||
}
|
}
|
||||||
else if (mixmode == MIX_OPAQUE)
|
else if (mixmode == MIX_OPAQUE)
|
||||||
{
|
{
|
||||||
FILL_RECTANGLE(clipx, clipy, clipcx, clipcy);
|
FILL_RECTANGLE_FAST(clipx, clipy, clipcx, clipcy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Paint text, character by character */
|
/* Paint text, character by character */
|
||||||
|
Loading…
Reference in New Issue
Block a user