[xorg-commit-diffs] xc/programs/Xserver/Xst Imakefile, 1.1.4.1,
1.1.4.2 xst_line.c, 1.1.4.1, 1.1.4.2 xst_cb.c, 1.1.4.2,
1.1.4.3 xst_font.c, 1.1.4.1, 1.1.4.2
Jay Hobson
xorg-commit at pdx.freedesktop.org
Thu Apr 22 08:59:37 EST 2004
Committed by: jhobson
Update of /cvs/xorg/xc/programs/Xserver/Xst
In directory pdx:/tmp/cvs-serv17338
Modified Files:
Tag: XORG-RELEASE-1-STSF
Imakefile xst_line.c xst_cb.c xst_font.c
Log Message:
Fixed backward text writing on nv framebuffer.
Known problem with glyph cache. Will be fixed in next version
Fixed problem with GC not being correct for Pixmap
Fixed problem with freeing wrong data
Index: Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xst/Attic/Imakefile,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/Imakefile 6 Apr 2004 02:41:20 -0000 1.1.4.1
+++ b/Imakefile 21 Apr 2004 22:59:33 -0000 1.1.4.2
@@ -56,11 +56,12 @@
STINC = -I$(TOP)/../stsf
+
INCLUDES = -I../include $(X11_INCLUDES) -I$(TOP)/lib/Xst -I$(TOP)/lib -I../hw/sun \
$(STINC)/interface $(STINC)/stsflib $(STINC)/STClientLibrary/src \
-I$(TOP)/include/extensions -I $(TOP)/include -I../Xext -I..
-EXTRA_DEFINES = $(EXT_DEFINES)
+EXTRA_DEFINES = $(EXT_DEFINES) -L$(TOP)/../stsf/STClientLibrary/src -lST
#if defined(SunArchitecture) && defined(SVR4Architecture) && defined(SharedDDX)
ANSICFLAG = -Xa
Index: xst_line.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xst/Attic/xst_line.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/xst_line.c 6 Apr 2004 02:41:20 -0000 1.1.4.1
+++ b/xst_line.c 21 Apr 2004 22:59:33 -0000 1.1.4.2
@@ -878,7 +878,10 @@
extern int gCBstep;
extern int pgx32;
#endif
+ STOutputMode oOutputMode;
+ STDevice stDev;
extern unsigned int panoramiXBaseGC;
+ extern GC *_XSTCreateGCforDepth();
extern void _RenderBlt();
extern void _InitCopyStructs();
@@ -1005,7 +1008,24 @@
mpriv->STaDirty = 0;
#ifdef sun
-#ifndef i386
+#ifdef i386
+ STGraphicsGetDevice(stGr, &stDev, &oOutputMode);
+
+ /*
+ * If we are drawing B&W text to the window, then replace the GC with one that
+ * uses the correct GC->ops calls. Do not want TE functions.
+ */
+ if (( oOutputMode & 0xFFFF ) == ST_OM_RASTER_MONO && pDraw->type == DRAWABLE_PIXMAP )
+ {
+ GC *nGC = _XSTCreateGCforDepth ( pDraw, pGC );
+ if ( nGC )
+ {
+ nGC->devPrivates[MATRIXgcPrivIndex].ptr = mpriv;
+ nGC->devPrivates[STgcPrivIndex].ptr = stGr;
+ rdpriv->pGC = nGC;
+ }
+ }
+#else
/*
* This allows for Fast access to windows. How are other machines going to
* do this?? XXX
Index: xst_cb.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xst/Attic/xst_cb.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/xst_cb.c 9 Apr 2004 14:50:30 -0000 1.1.4.2
+++ b/xst_cb.c 21 Apr 2004 22:59:33 -0000 1.1.4.3
@@ -473,10 +473,14 @@
{
do_copy_area = 0;
#ifdef sun
+#ifndef i386
*oStep = iDraw->width;
#else
*oStep = ((PixmapPtr)iDraw)->devKind/4;
#endif
+#else
+ *oStep = ((PixmapPtr)iDraw)->devKind/4;
+#endif
*oDst = ((unsigned int *)((PixmapPtr)iDraw)->devPrivate.ptr) + ( iDraw->y * *oStep + iDraw->x );
}
#ifdef sun
@@ -3833,11 +3837,14 @@
/**
memcpy ( &(pfont->info.minbounds), &(pCI->metrics), sizeof ( xCharInfo ));
**/
-
+#ifndef XFree86Server
if ( rdpriv->poly )
(pGC->ops->PolyGlyphBlt) ( pDraw, pGC, gCIx, gCIy + h, gnCI, &pCI, NULL );
else
(pGC->ops->ImageGlyphBlt) ( pDraw, pGC, gCIx, gCIy + h, gnCI, &pCI, NULL );
+#else
+ (pGC->ops->PolyGlyphBlt) ( pDraw, pGC, gCIx, gCIy, gnCI, &pCI, NULL );
+#endif
}
else
{
@@ -4966,6 +4973,24 @@
}
}
+int XSTswapBits[256] = {
+ 0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240,
+ 8, 136, 74, 200, 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248,
+ 4, 132, 68, 196, 36, 164, 100, 228, 20, 148, 84, 212, 52, 180, 116, 244,
+ 12, 140, 78, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252,
+ 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, 210, 50, 178, 114, 242,
+ 10, 138, 76, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250,
+ 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, 214, 54, 182, 118, 246,
+ 14, 142, 80, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254,
+ 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, 209, 49, 177, 113, 241,
+ 9, 137, 75, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249,
+ 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, 213, 53, 181, 117, 245,
+ 13, 141, 79, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253,
+ 3, 131, 67, 195, 35, 163, 99, 227, 19, 147, 83, 211, 51, 179, 115, 243,
+ 11, 139, 77, 203, 43, 171, 107, 235, 27, 155, 91, 219, 59, 187, 123, 251,
+ 7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247,
+ 15, 143, 81, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255};
+
void
_LineRender(STRasterDevice iDev, STBitBltPtr iBBdata, byte *source)
{
@@ -4978,6 +5003,7 @@
STOutputMode oOutputMode;
STDevice stDev;
CharInfoPtr pCI;
+ int i;
st = STGraphicsGetDevice(stGr, &stDev, &oOutputMode);
if (( oOutputMode & 0xFFFF ) != ST_OM_RASTER_MONO &&
@@ -5009,7 +5035,16 @@
_LineRender_1_stipple ( pDraw, pGC, rdpriv );
else
#endif
+ {
+#ifdef XFree86Server
+ for ( i=0; i < iBBdata->h * iBBdata->bytesPerRow; i++ )
+ {
+ source[i] = XSTswapBits[source[i]];
+ }
+#endif
+
_LineRender_1_cfb ( pDraw, pGC, rdpriv );
+ }
#else
_LineRender_1_render ( gDev, pCI, source );
/***
Index: xst_font.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xst/Attic/xst_font.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/xst_font.c 6 Apr 2004 02:41:20 -0000 1.1.4.1
+++ b/xst_font.c 21 Apr 2004 22:59:33 -0000 1.1.4.2
@@ -401,7 +401,7 @@
{
memcpy ( curByte, (char *)sBitArray, num_sbits * sizeof ( int ));
if ( sBitArray )
- free ( sBitArray );
+ free ( *sBitArray );
curByte += num_sbits * sizeof ( int );
}
if ( lenFName > 0 && fName )
@@ -410,7 +410,7 @@
curByte += lenFName;
*curByte = '\0';
curByte ++;
- free ( fName );
+ free ( (char *)*fName );
}
if ( lenPSName > 0 && psName )
{
@@ -418,14 +418,14 @@
curByte += lenPSName;
*curByte = '\0';
curByte ++;
- free ( psName );
+ free ( (char *)*psName );
}
if ( lenURL > 0 && fURL )
{
strncpy ( curByte, (char *)*fURL, lenURL );
curByte += lenURL;
*curByte = '\0';
- free ( fURL );
+ free ( *fURL );
}
}
WriteToClient(client, totalBytes, (char *)rep);
More information about the xorg-commit-diffs
mailing list