only do stipple ops on backingstore when possible

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@679 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Jay Sorg 2004-04-26 23:14:07 +00:00
parent 7e650f8a49
commit f0fb055450

12
xwin.c
View File

@ -1799,7 +1799,7 @@ ui_patblt(uint8 opcode,
{
case 0: /* Solid */
SET_FOREGROUND(fgcolour);
FILL_RECTANGLE(x, y, cx, cy);
FILL_RECTANGLE_BACKSTORE(x, y, cx, cy);
break;
case 2: /* Hatch */
@ -1810,7 +1810,7 @@ ui_patblt(uint8 opcode,
XSetFillStyle(g_display, g_gc, FillOpaqueStippled);
XSetStipple(g_display, g_gc, fill);
XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin);
FILL_RECTANGLE(x, y, cx, cy);
FILL_RECTANGLE_BACKSTORE(x, y, cx, cy);
XSetFillStyle(g_display, g_gc, FillSolid);
XSetTSOrigin(g_display, g_gc, 0, 0);
ui_destroy_glyph((HGLYPH) fill);
@ -1820,15 +1820,12 @@ ui_patblt(uint8 opcode,
for (i = 0; i != 8; i++)
ipattern[7 - i] = brush->pattern[i];
fill = (Pixmap) ui_create_glyph(8, 8, ipattern);
SET_FOREGROUND(bgcolour);
SET_BACKGROUND(fgcolour);
XSetFillStyle(g_display, g_gc, FillOpaqueStippled);
XSetStipple(g_display, g_gc, fill);
XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin);
FILL_RECTANGLE(x, y, cx, cy);
FILL_RECTANGLE_BACKSTORE(x, y, cx, cy);
XSetFillStyle(g_display, g_gc, FillSolid);
XSetTSOrigin(g_display, g_gc, 0, 0);
ui_destroy_glyph((HGLYPH) fill);
@ -1839,6 +1836,9 @@ ui_patblt(uint8 opcode,
}
RESET_FUNCTION(opcode);
if (g_ownbackstore)
XCopyArea(g_display, g_backstore, g_wnd, g_gc, x, y, cx, cy, x, y);
}
void