diff --git a/.gitignore b/.gitignore index 1e7970677..4118cd001 100644 --- a/.gitignore +++ b/.gitignore @@ -145,6 +145,7 @@ hw/xfree86/doc/man/Xorg.man hw/xfree86/doc/man/xorg.conf.5x hw/xfree86/doc/man/xorg.conf.man hw/xfree86/exa/exa.4 +hw/xfree86/exa/exa.4x hw/xfree86/exa/exa.man hw/xfree86/fbdevhw/fbdevhw.4x hw/xfree86/fbdevhw/fbdevhw.man diff --git a/configure.ac b/configure.ac index 75618554d..426b2b541 100644 --- a/configure.ac +++ b/configure.ac @@ -296,7 +296,7 @@ DEFAULT_VENDOR_NAME_SHORT="X.Org" DEFAULT_VERSION_MAJOR=7 DEFAULT_VERSION_MINOR=1 DEFAULT_VERSION_PATCH=99 -DEFAULT_VERSION_SNAP=1 +DEFAULT_VERSION_SNAP=2 DEFAULT_RELEASE_DATE="21 December 2005" DEFAULT_VENDOR_WEB="http://wiki.x.org" diff --git a/exa/exa.c b/exa/exa.c index aa5532a98..1022b2ec3 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -523,6 +523,9 @@ exaDriverInit (ScreenPtr pScreen, ExaDriverPtr pScreenInfo) { ExaScreenPrivPtr pExaScr; +#ifdef RENDER + PictureScreenPtr ps; +#endif if (pScreenInfo->exa_major != EXA_VERSION_MAJOR || pScreenInfo->exa_minor > EXA_VERSION_MINOR) @@ -536,7 +539,7 @@ exaDriverInit (ScreenPtr pScreen, } #ifdef RENDER - PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); + ps = GetPictureScreenIfSet(pScreen); #endif if (exaGeneration != serverGeneration) { diff --git a/exa/exa_render.c b/exa/exa_render.c index b21c5d724..2187af810 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -535,7 +535,8 @@ exaComposite(CARD8 op, if (op == PictOpSrc) { if (pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1 && pSrc->repeat) + pSrc->pDrawable->height == 1 && pSrc->repeat && + pSrc->repeatType == RepeatNormal) { ret = exaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst, width, height); @@ -575,6 +576,8 @@ exaComposite(CARD8 op, pMask->repeat = 0; if (pExaScr->info->PrepareComposite && + (!pSrc->repeat || pSrc->repeat == RepeatNormal) && + (!pMask || !pMask->repeat || pMask->repeat == RepeatNormal) && !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) { ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, diff --git a/hw/dmx/dmxcmap.c b/hw/dmx/dmxcmap.c index f46dc5411..b4279e7ce 100644 --- a/hw/dmx/dmxcmap.c +++ b/hw/dmx/dmxcmap.c @@ -46,7 +46,7 @@ #include "micmap.h" -static int dmxInitColormapPrivateFunc(ColormapPtr pColormap) +static int dmxInitColormapPrivateFunc(ColormapPtr pColormap, int index) { return TRUE; } diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 36dde3031..bcad246f5 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -75,6 +75,7 @@ extern DeviceAssocRec mouse_assoc; #endif #ifdef XKB +#undef XKB_IN_SERVER #define XKB_IN_SERVER #include #endif @@ -617,6 +618,9 @@ static Bool configFiles(XF86ConfFilesPtr fileconf) { MessageType pathFrom = X_DEFAULT; + int countDirs; + char *temp_path; + char *log_buf; /* FontPath */ @@ -676,13 +680,13 @@ configFiles(XF86ConfFilesPtr fileconf) FatalError("No valid FontPath could be found."); /* make fontpath more readable in the logfiles */ - int countDirs = 1; - char *temp_path = defaultFontPath; + countDirs = 1; + temp_path = defaultFontPath; while((temp_path = index(temp_path, ',')) != NULL) { countDirs++; temp_path++; } - char *log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); + log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); if(!log_buf) /* fallback to old method */ xf86Msg(pathFrom, "FontPath set to \"%s\"\n", defaultFontPath); else { diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c index 65a5a0ea3..77773f7fb 100644 --- a/hw/xfree86/os-support/linux/lnx_agp.c +++ b/hw/xfree86/os-support/linux/lnx_agp.c @@ -1,7 +1,7 @@ /* * Abstraction of the AGP GART interface. * - * This version is for both Linux and FreeBSD. + * This version is for Linux and Free/Open/NetBSD. * * Copyright © 2000 VA Linux Systems, Inc. * Copyright © 2001 The XFree86 Project, Inc. @@ -264,7 +264,11 @@ xf86DeallocateGARTMemory(int screenNum, int key) return FALSE; } +#ifdef __linux__ if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *)key) != 0) { +#else + if (ioctl(gartFd, AGPIOC_DEALLOCATE, &key) != 0) { +#endif xf86DrvMsg(screenNum, X_WARNING,"xf86DeAllocateGARTMemory: " "deallocation gart memory with key %d failed\n\t(%s)\n", key, strerror(errno)); diff --git a/hw/xfree86/os-support/shared/libc_wrapper.c b/hw/xfree86/os-support/shared/libc_wrapper.c index 1663893d9..fb1363ab2 100644 --- a/hw/xfree86/os-support/shared/libc_wrapper.c +++ b/hw/xfree86/os-support/shared/libc_wrapper.c @@ -89,8 +89,8 @@ extern int mmapFd; #include #endif -#define NEED_XF86_TYPES -#define NEED_XF86_PROTOTYPES +#define NEED_XF86_TYPES 1 +#define NEED_XF86_PROTOTYPES 1 #define DONT_DEFINE_WRAPPERS #include "xf86_ansic.h" diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c index 82baa5a04..de3bb8a49 100644 --- a/hw/xfree86/parser/write.c +++ b/hw/xfree86/parser/write.c @@ -170,7 +170,7 @@ xf86writeConfigFile (const char *filename, XF86ConfigPtr cptr) strerror(errno)); return 0; case 0: /* child */ - if (setuid(getuid() == -1) + if (setuid(getuid()) == -1) FatalError("xf86writeConfigFile(): " "setuid failed(%s)\n", strerror(errno)); diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c index a1ff51087..a7acf450a 100644 --- a/hw/xfree86/xaa/xaaPict.c +++ b/hw/xfree86/xaa/xaaPict.c @@ -218,7 +218,13 @@ XAADoComposite ( if (pDst->alphaMap || pSrc->alphaMap || (pMask && pMask->alphaMap)) return FALSE; - + + if ((pSrc->repeat && pSrc->repeatType != RepeatNormal) || + (pMask && pMask->repeat && pMask->repeatType != RepeatNormal)) + { + return FALSE; + } + xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; xSrc += pSrc->pDrawable->x; diff --git a/hw/xfree86/xaa/xaaWideLine.c b/hw/xfree86/xaa/xaaWideLine.c index fbec29e7d..369088e32 100644 --- a/hw/xfree86/xaa/xaaWideLine.c +++ b/hw/xfree86/xaa/xaaWideLine.c @@ -818,20 +818,6 @@ XAAPolylinesWideSolid ( return; } - if (mode == CoordModePrevious) { - pPts->x += xorg; - pPts->y += yorg; - } else if(xorg | yorg) { - register int n = npt; - register DDXPointPtr pts = pPts; - - while(n--) { - pts->x += xorg; - pts->y += yorg; - pts++; - } - } - x2 = pPts->x; y2 = pPts->y; if (npt > 1) { @@ -869,6 +855,8 @@ XAAPolylinesWideSolid ( infoRec->ClipBox->x2 - 1, infoRec->ClipBox->y2 - 1); } + x2 += xorg; + y2 += yorg; while (--npt) { x1 = x2; y1 = y2; @@ -878,6 +866,9 @@ XAAPolylinesWideSolid ( if (mode == CoordModePrevious) { x2 += x1; y2 += y1; + } else { + x2 += xorg; + y2 += yorg; } if ((x1 != x2) || (y1 != y2)) { somethingDrawn = TRUE; diff --git a/hw/xnest/XNCursor.h b/hw/xnest/XNCursor.h index 8684a5e7f..6cbccfdec 100644 --- a/hw/xnest/XNCursor.h +++ b/hw/xnest/XNCursor.h @@ -29,6 +29,7 @@ typedef struct { Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); Bool xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); +void xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed); void xnestSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y); void xnestMoveCursor (ScreenPtr pScreen, int x, int y); diff --git a/render/filter.c b/render/filter.c index f81cc4a8c..71375dae9 100644 --- a/render/filter.c +++ b/render/filter.c @@ -271,11 +271,24 @@ PictureResetFilters (ScreenPtr pScreen) int SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int nparams) { - ScreenPtr pScreen = pPicture->pDrawable->pScreen; - PictureScreenPtr ps = GetPictureScreen(pScreen); - PictFilterPtr pFilter = PictureFindFilter (pScreen, name, len); + PictFilterPtr pFilter; xFixed *new_params; - int i, result; + int i, s, result; + + pFilter = PictureFindFilter (screenInfo.screens[0], name, len); + + if (pPicture->pDrawable == NULL) { + /* For source pictures, the picture isn't tied to a screen. So, ensure + * that all screens can handle a filter we set for the picture. + */ + for (s = 0; s < screenInfo.numScreens; s++) { + if (PictureFindFilter (screenInfo.screens[s], name, len)->id != + pFilter->id) + { + return BadMatch; + } + } + } if (!pFilter) return BadName; @@ -300,8 +313,13 @@ SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int pPicture->filter_params[i] = params[i]; pPicture->filter = pFilter->id; - result = (*ps->ChangePictureFilter) (pPicture, pPicture->filter, - params, nparams); - return result; + if (pPicture->pDrawable) { + ScreenPtr pScreen = pPicture->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + result = (*ps->ChangePictureFilter) (pPicture, pPicture->filter, + params, nparams); + return result; + } return Success; } diff --git a/render/picture.c b/render/picture.c index ee385e56b..55763fcc1 100644 --- a/render/picture.c +++ b/render/picture.c @@ -1217,7 +1217,8 @@ ChangePicture (PicturePtr pPicture, error = BadPixmap; break; } - if (pAlpha->pDrawable->type != DRAWABLE_PIXMAP) + if (pAlpha->pDrawable == NULL || + pAlpha->pDrawable->type != DRAWABLE_PIXMAP) { client->errorValue = pid; error = BadMatch; @@ -1469,9 +1470,6 @@ SetPictureTransform (PicturePtr pPicture, { 0x00000, xFixed1, 0x00000 }, { 0x00000, 0x00000, xFixed1 }, } }; - ScreenPtr pScreen = pPicture->pDrawable->pScreen; - PictureScreenPtr ps = GetPictureScreen(pScreen); - int result; if (transform && memcmp (transform, &identity, sizeof (PictTransform)) == 0) transform = 0; @@ -1496,9 +1494,16 @@ SetPictureTransform (PicturePtr pPicture, } pPicture->serialNumber |= GC_CHANGE_SERIAL_BIT; - result = (*ps->ChangePictureTransform) (pPicture, transform); + if (pPicture->pDrawable != NULL) { + int result; + PictureScreenPtr ps = GetPictureScreen(pPicture->pDrawable->pScreen); - return result; + result = (*ps->ChangePictureTransform) (pPicture, transform); + + return result; + } + + return Success; } void diff --git a/render/picturestr.h b/render/picturestr.h index 1ea91201e..f1617f627 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -349,8 +349,18 @@ typedef struct _PictureScreen { PictFilterAliasPtr filterAliases; int nfilterAliases; + /** + * Called immediately after a picture's transform is changed through the + * SetPictureTransform request. Not called for source-only pictures. + */ ChangePictureTransformProcPtr ChangePictureTransform; + + /** + * Called immediately after a picture's transform is changed through the + * SetPictureFilter request. Not called for source-only pictures. + */ ChangePictureFilterProcPtr ChangePictureFilter; + DestroyPictureFilterProcPtr DestroyPictureFilter; TrapezoidsProcPtr Trapezoids;