Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.488 diff -u -2 -0 -r1.488 ChangeLog --- xc/ChangeLog 24 Oct 2004 21:12:10 -0000 1.488 +++ xc/ChangeLog 25 Oct 2004 07:04:15 -0000 @@ -1,20 +1,35 @@ +2004-10-24 Roland Mainz + * xc/programs/Imakefile + * xc/programs/xdbedizzy/Imakefile + * xc/programs/xdbedizzy/xdbedizzy.c + * xc/programs/xdbedizzy/xdbedizzy.man + * xc/programs/xdbedizzy/xdbedizzy.sgml + Bugzilla #1664: RFE: Add support for the DOUBLE-BUFFER extension + to the Xprint server and DDX. Additionally a "pixmap-scrubber" + optimisation is added to the PostScript DDX to remove all content + from a vector pixmap when a |PolyFillRect()| call covers the whole + pixmap surface with a solid fill (this avoids that a backbuffer + vector pixmap gets constantly filled even when the content is + not visible anymore after |XdbeSwapBuffers()| has cleared the + hidden buffer with the background color). + 2004-10-24 Matthieu Herrb * programs/Xserver/hw/xfree86/drivers/wsfb/wsfb_driver.c: - don't pretend to support 24bpp or 32bpp framebuffers if probed depth is less than 24. Avoids a core dump after a common configuration error. 2004-10-21 Alex Deucher * programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c: (RADEONDisplayVideo), (RADEONPutVideo): - make the overlay work on crtc2 again - make PutVideo() MergedFB aware 2004-10-22 Matthieu Herrb * programs/xdm/greeter/verify.c Make BSDAUTH able to use non-default login classes. (Bugzilla #1676, Pierre Lalet). Index: xc/config/cf/xprint_site.def =================================================================== RCS file: /cvs/xorg/xc/config/cf/xprint_site.def,v retrieving revision 1.3 diff -u -2 -0 -r1.3 xprint_site.def --- xc/config/cf/xprint_site.def 4 May 2004 22:58:59 -0000 1.3 +++ xc/config/cf/xprint_site.def 25 Oct 2004 07:04:16 -0000 @@ -73,41 +73,40 @@ /* Some flags to build the Xprint server (Xprt), the tools and the fonts */ #define BuildServer YES #define XprtServer YES /* Needed to build encoding files */ #define BuildFonts YES #define BuildSpeedoFonts NO #define BuildType1Fonts NO #define BuildCIDFonts NO #define BuildTrueTypeFonts NO #define BuildEthiopicFonts NO #define BuildBethMarduthoFonts NO #define GzipFontCompression YES #define BuildFreeType YES /* Xprt does not have special support for GLX and XIE (yet) */ #define BuildGlxExt NO #define BuildXIE NO /* X extensions not needed */ -#define BuildDBE NO #define BuildXKB NO #define BuildRECORD NO #define BuildDPMS NO #define BuildXF86VidModeExt NO #define BuildXInputExt NO #define BuildScreenSaverExt NO #define BuildXvExt NO /* LBX is needed for compatibility to the XWeb stuff */ #define BuildLBX YES /* Xprt's non-bitmap based DDX (PS, PCL, PDF, SVGprint etc.) cannot support MIT-SHM */ #undef HasShm #define HasShm NO /* Disable stipple code due portability issues * (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=2220) */ #define BuildStippleCode NO /* Temporary for Xorg tree */ #define BuildFontconfigLibrary NO #define XorgServer NO #define XF86Server NO Index: xc/programs/Xserver/Xprint/ps/Ps.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/Ps.h,v retrieving revision 1.4 diff -u -2 -0 -r1.4 Ps.h --- xc/programs/Xserver/Xprint/ps/Ps.h 4 Oct 2004 05:04:14 -0000 1.4 +++ xc/programs/Xserver/Xprint/ps/Ps.h 25 Oct 2004 07:05:06 -0000 @@ -549,33 +549,34 @@ */ extern Bool PsCreateColormap(ColormapPtr pColor); extern void PsDestroyColormap(ColormapPtr pColor); extern void PsInstallColormap(ColormapPtr pColor); extern void PsUninstallColormap(ColormapPtr pColor); extern int PsListInstalledColormaps(ScreenPtr pScreen, XID *pCmapList); extern void PsStoreColors(ColormapPtr pColor, int ndef, xColorItem *pdefs); extern void PsResolveColor(unsigned short *pRed, unsigned short *pGreen, unsigned short *pBlue, VisualPtr pVisual); extern PsOutColor PsGetPixelColor(ColormapPtr cMap, int pixval); extern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut, ColormapPtr cMap); /* * Functions in PsPixmap.c */ extern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height, int depth); +extern void PsScrubPixmap(PixmapPtr pPixmap); extern Bool PsDestroyPixmap(PixmapPtr pPixmap); extern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv); extern void PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable); extern int PsCloneDisplayElm(PixmapPtr dst, DisplayElmPtr elm, DisplayElmPtr newElm, int xoff, int yoff); extern void PsCopyDisplayList(PixmapPtr src, PixmapPtr dst, int xoff, int yoff, int x, int y, int w, int h); extern PsElmPtr PsCreateFillElementList(PixmapPtr pix, int *nElms); extern PsElmPtr PsCloneFillElementList(int nElms, PsElmPtr elms); extern void PsDestroyFillElementList(int nElms, PsElmPtr elms); #endif /* _PS_H_ */ Index: xc/programs/Xserver/Xprint/ps/PsPixmap.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsPixmap.c,v retrieving revision 1.4 diff -u -2 -0 -r1.4 PsPixmap.c --- xc/programs/Xserver/Xprint/ps/PsPixmap.c 3 Oct 2004 15:34:33 -0000 1.4 +++ xc/programs/Xserver/Xprint/ps/PsPixmap.c 25 Oct 2004 07:05:08 -0000 @@ -97,47 +97,49 @@ pPixmap->drawable.type = DRAWABLE_PIXMAP; pPixmap->drawable.class = 0; pPixmap->drawable.pScreen = pScreen; pPixmap->drawable.depth = depth; pPixmap->drawable.bitsPerPixel = _BitsPerPixel(depth); pPixmap->drawable.id = 0; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->drawable.x = 0; pPixmap->drawable.y = 0; pPixmap->drawable.width = width; pPixmap->drawable.height = height; pPixmap->devKind = 0; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec)); if( !pPixmap->devPrivate.ptr ) { xfree(pPixmap); return NullPixmap; } return pPixmap; } -Bool -PsDestroyPixmap(PixmapPtr pPixmap) +/* PsScrubPixmap: Remove all content from a pixmap (used by + * |PsPolyFillRect()| when the "solid fill" operation covers + * the whole pixmap) */ +void +PsScrubPixmap(PixmapPtr pPixmap) { PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr; DisplayListPtr disp = priv->dispList; - if( --pPixmap->refcnt ) return TRUE; while( disp ) { int i; DisplayListPtr oldDisp = disp; disp = disp->next; for( i=0 ; inelms ; i++ ) { DisplayElmPtr elm = &oldDisp->elms[i]; switch(elm->type) { case PolyPointCmd: case PolyLineCmd: if( elm->c.polyPts.pPoints ) xfree(elm->c.polyPts.pPoints); break; case PolySegmentCmd: if( elm->c.segments.pSegments ) xfree(elm->c.segments.pSegments); break; case PolyRectangleCmd: if( elm->c.rects.pRects ) xfree(elm->c.rects.pRects); @@ -160,40 +162,54 @@ break; case Text16Cmd: case TextI16Cmd: if( elm->c.text16.string ) xfree(elm->c.text16.string); break; case PutImageCmd: if( elm->c.image.pData ) xfree(elm->c.image.pData); break; case BeginFrameCmd: break; case EndFrameCmd: break; } if (elm->type != BeginFrameCmd && elm->type != EndFrameCmd) { (void) FreeGC(elm->gc, (GContext) 0); } } xfree(oldDisp); } + + priv->dispList = NULL; +} + +Bool +PsDestroyPixmap(PixmapPtr pPixmap) +{ + PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr; + DisplayListPtr disp = priv->dispList; + + if( --pPixmap->refcnt ) return TRUE; + + PsScrubPixmap(pPixmap); + xfree(priv); xfree(pPixmap); return TRUE; } DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv) { DisplayListPtr disp = priv->dispList; for(; disp ; disp=disp->next ) { if( disp->nelms>=DPY_BLOCKSIZE && disp->next ) continue; if( disp->nelmsnext = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec)); disp->next->next = (DisplayListPtr)0; disp->next->nelms = 0; } disp = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec)); disp->next = (DisplayListPtr)0; Index: xc/programs/Xserver/Xprint/ps/PsPolygon.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsPolygon.c,v retrieving revision 1.2 diff -u -2 -0 -r1.2 PsPolygon.c --- xc/programs/Xserver/Xprint/ps/PsPolygon.c 23 Apr 2004 18:57:56 -0000 1.2 +++ xc/programs/Xserver/Xprint/ps/PsPolygon.c 25 Oct 2004 07:05:08 -0000 @@ -186,40 +186,65 @@ PsOut_Polygon(psOut, nPoints, pts); xfree(pts); } } void PsPolyFillRect( DrawablePtr pDrawable, GCPtr pGC, int nRects, xRectangle *pRects) { if( pDrawable->type==DRAWABLE_PIXMAP ) { DisplayElmPtr elm; PixmapPtr pix = (PixmapPtr)pDrawable; PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; DisplayListPtr disp; GCPtr gc; +#ifdef DBE + /* Remove previous pixmap content if we render one single rect which + * covers the whole pixmap surface (this optimisation was added for + * the double-buffer extension ("DBE") which uses |PolyFillRect()| + * to clear the buffer - but it makes sense in other cases, too). + */ + if (nRects == 1) + { + extern Bool noDbeExtension; + + if ( (pRects[0].x==0) && (pRects[0].y==0) && + (pRects[0].width==pDrawable->width) && (pRects[0].height==pDrawable->height) && + (pGC->fillStyle == FillSolid) && + (noDbeExtension == False)) + { +#ifdef DEBUG_gismobile + ErrorF("PsPolyFillRect: scrubbing pixmap...\n"); +#endif /* DEBUG_gismobile */ + /* Remove all content from the pixmap as it would be covered + * by the whole rect anyway */ + PsScrubPixmap(pDrawable); + } + } +#endif /* DBE */ + if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; disp = PsGetFreeDisplayBlock(priv); elm = &disp->elms[disp->nelms]; elm->type = PolyFillRectCmd; elm->gc = gc; elm->c.rects.nRects = nRects; elm->c.rects.pRects = (xRectangle *)xalloc(nRects*sizeof(xRectangle)); memcpy(elm->c.rects.pRects, pRects, nRects*sizeof(xRectangle)); disp->nelms += 1; } else { int i; PsOutPtr psOut; ColormapPtr cMap; if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; PsOut_Offset(psOut, pDrawable->x, pDrawable->y); Index: xc/programs/Xserver/mi/miinitext.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/mi/miinitext.c,v retrieving revision 1.13 diff -u -2 -0 -r1.13 miinitext.c --- xc/programs/Xserver/mi/miinitext.c 14 Sep 2004 00:51:25 -0000 1.13 +++ xc/programs/Xserver/mi/miinitext.c 25 Oct 2004 07:05:22 -0000 @@ -57,41 +57,40 @@ #endif #if defined(QNX4) /* sleaze for Watcom on QNX4 ... */ #undef PEXEXT #undef XIE #undef GLXEXT #endif /* Make sure Xprt only announces extensions it supports */ #ifdef PRINT_ONLY_SERVER #undef MITSHM /* this is incompatible to the vector-based Xprint DDX */ #undef XKB #undef PANORAMIX #undef RES #undef XIE #undef XINPUT #undef XV #undef SCREENSAVER #undef XIDLE #undef XRECORD -#undef DBE #undef XF86VIDMODE #undef XF86MISC #undef XFreeXDGA #undef XF86DRI #undef DPMSExtension #undef DPSEXT #undef FONTCACHE #undef RENDER /* not yet */ #undef DAMAGE #undef XFIXES #undef XEVIE #endif /* PRINT_ONLY_SERVER */ extern Bool noTestExtensions; #ifdef BEZIER extern Bool noBezierExtension; #endif #ifdef BIGREQS