diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-12-05 15:36:12 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-12-05 15:36:12 +0000 |
commit | a90ee792d96752ad1b71b9ada922fa6afe478c99 (patch) | |
tree | 6143b00f7646951d23dfe2a4fe2992ca40b77069 /xserver/hw/xfree86/shadowfb | |
parent | bc97d4ecc0aa9e1b823565b07282f848700bd11a (diff) |
Upgrade to xorg-server 1.9.2.
Tested by ajacoutot@, krw@, shadchin@ and jasper@ on various configurations
including multihead with both zaphod and xrandr.
Diffstat (limited to 'xserver/hw/xfree86/shadowfb')
-rw-r--r-- | xserver/hw/xfree86/shadowfb/Makefile.in | 30 | ||||
-rw-r--r-- | xserver/hw/xfree86/shadowfb/shadow.c | 94 |
2 files changed, 58 insertions, 66 deletions
diff --git a/xserver/hw/xfree86/shadowfb/Makefile.in b/xserver/hw/xfree86/shadowfb/Makefile.in index 6174fbcb5..3c44b9726 100644 --- a/xserver/hw/xfree86/shadowfb/Makefile.in +++ b/xserver/hw/xfree86/shadowfb/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/shadowfb/shadow.c b/xserver/hw/xfree86/shadowfb/shadow.c index 9c9aa0d55..344f1abf7 100644 --- a/xserver/hw/xfree86/shadowfb/shadow.c +++ b/xserver/hw/xfree86/shadowfb/shadow.c @@ -27,9 +27,7 @@ #include "xf86str.h" #include "shadowfb.h" -#ifdef RENDER # include "picturestr.h" -#endif static Bool ShadowCloseScreen (int i, ScreenPtr pScreen); static void ShadowCopyWindow( @@ -51,7 +49,6 @@ static Bool ShadowModifyPixmapHeader( static Bool ShadowEnterVT(int index, int flags); static void ShadowLeaveVT(int index, int flags); -#ifdef RENDER static void ShadowComposite( CARD8 op, PicturePtr pSrc, @@ -66,7 +63,6 @@ static void ShadowComposite( CARD16 width, CARD16 height ); -#endif /* RENDER */ typedef struct { @@ -77,9 +73,7 @@ typedef struct { CopyWindowProcPtr CopyWindow; CreateGCProcPtr CreateGC; ModifyPixmapHeaderProcPtr ModifyPixmapHeader; -#ifdef RENDER CompositeProcPtr Composite; -#endif /* RENDER */ Bool (*EnterVT)(int, int); void (*LeaveVT)(int, int); Bool vtSema; @@ -90,11 +84,11 @@ typedef struct { GCFuncs *funcs; } ShadowGCRec, *ShadowGCPtr; +static DevPrivateKeyRec ShadowScreenKeyRec; +#define ShadowScreenKey (&ShadowScreenKeyRec) -static int ShadowScreenKeyIndex; -static DevPrivateKey ShadowScreenKey = &ShadowScreenKeyIndex; -static int ShadowGCKeyIndex; -static DevPrivateKey ShadowGCKey = &ShadowGCKeyIndex; +static DevPrivateKeyRec ShadowGCKeyRec; +#define ShadowGCKey (&ShadowGCKeyRec) #define GET_SCREEN_PRIVATE(pScreen) \ (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey) @@ -164,16 +158,17 @@ ShadowFBInit2 ( ){ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ShadowScreenPtr pPriv; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif /* RENDER */ if(!preRefreshArea && !postRefreshArea) return FALSE; - if(!dixRequestPrivate(ShadowGCKey, sizeof(ShadowGCRec))) + if (!dixRegisterPrivateKey(&ShadowScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if(!dixRegisterPrivateKey(&ShadowGCKeyRec, PRIVATE_GC, sizeof(ShadowGCRec))) return FALSE; - if(!(pPriv = (ShadowScreenPtr)xalloc(sizeof(ShadowScreenRec)))) + if(!(pPriv = (ShadowScreenPtr)malloc(sizeof(ShadowScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, ShadowScreenKey, pPriv); @@ -199,12 +194,10 @@ ShadowFBInit2 ( pScrn->EnterVT = ShadowEnterVT; pScrn->LeaveVT = ShadowLeaveVT; -#ifdef RENDER if(ps) { pPriv->Composite = ps->Composite; ps->Composite = ShadowComposite; } -#endif /* RENDER */ return TRUE; } @@ -223,9 +216,14 @@ static Bool ShadowEnterVT(int index, int flags) { ScrnInfoPtr pScrn = xf86Screens[index]; + Bool ret; ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScrn->pScreen); - if((*pPriv->EnterVT)(index, flags)) { + pScrn->EnterVT = pPriv->EnterVT; + ret = (*pPriv->EnterVT)(index, flags); + pPriv->EnterVT = pScrn->EnterVT; + pScrn->EnterVT = ShadowEnterVT; + if(ret) { pPriv->vtSema = TRUE; return TRUE; } @@ -236,11 +234,15 @@ ShadowEnterVT(int index, int flags) static void ShadowLeaveVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(xf86Screens[index]->pScreen); pPriv->vtSema = FALSE; + pScrn->LeaveVT = pPriv->LeaveVT; (*pPriv->LeaveVT)(index, flags); + pPriv->LeaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = ShadowLeaveVT; } /**********************************************************/ @@ -251,9 +253,7 @@ ShadowCloseScreen (int i, ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen); -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif /* RENDER */ pScreen->CloseScreen = pPriv->CloseScreen; pScreen->CopyWindow = pPriv->CopyWindow; @@ -263,13 +263,11 @@ ShadowCloseScreen (int i, ScreenPtr pScreen) pScrn->EnterVT = pPriv->EnterVT; pScrn->LeaveVT = pPriv->LeaveVT; -#ifdef RENDER if(ps) { ps->Composite = pPriv->Composite; } -#endif /* RENDER */ - xfree((pointer)pPriv); + free((pointer)pPriv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -286,18 +284,18 @@ ShadowCopyWindow( RegionRec rgnDst; if (pPriv->vtSema) { - REGION_NULL(pWin->drawable.pScreen, &rgnDst); - REGION_COPY(pWin->drawable.pScreen, &rgnDst, prgn); + RegionNull(&rgnDst); + RegionCopy(&rgnDst, prgn); - REGION_TRANSLATE(pWin->drawable.pScreen, &rgnDst, + RegionTranslate(&rgnDst, pWin->drawable.x - ptOldOrg.x, pWin->drawable.y - ptOldOrg.y); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, &rgnDst); - if ((num = REGION_NUM_RECTS(&rgnDst))) { + RegionIntersect(&rgnDst, &pWin->borderClip, &rgnDst); + if ((num = RegionNumRects(&rgnDst))) { if(pPriv->preRefresh) - (*pPriv->preRefresh)(pPriv->pScrn, num, REGION_RECTS(&rgnDst)); + (*pPriv->preRefresh)(pPriv->pScrn, num, RegionRects(&rgnDst)); } else { - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + RegionUninit(&rgnDst); } } @@ -307,8 +305,8 @@ ShadowCopyWindow( if (num) { if (pPriv->postRefresh) - (*pPriv->postRefresh)(pPriv->pScrn, num, REGION_RECTS(&rgnDst)); - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + (*pPriv->postRefresh)(pPriv->pScrn, num, RegionRects(&rgnDst)); + RegionUninit(&rgnDst); } } @@ -355,7 +353,6 @@ ShadowModifyPixmapHeader( return retval; } -#ifdef RENDER static void ShadowComposite( CARD8 op, @@ -408,7 +405,6 @@ ShadowComposite( (*pPriv->postRefresh)(pPriv->pScrn, 1, &box); } } -#endif /* RENDER */ /**********************************************************/ @@ -1026,7 +1022,7 @@ ShadowPolyRectangle( offset1 = offset2 >> 1; offset3 = offset2 - offset1; - pBoxInit = (BoxPtr)xalloc(nRects * 4 * sizeof(BoxRec)); + pBoxInit = (BoxPtr)malloc(nRects * 4 * sizeof(BoxRec)); pbox = pBoxInit; while(nRects--) { @@ -1077,7 +1073,7 @@ ShadowPolyRectangle( if(pPriv->preRefresh) (*pPriv->preRefresh)(pPriv->pScrn, num, pBoxInit); } else { - xfree(pBoxInit); + free(pBoxInit); } } } @@ -1089,7 +1085,7 @@ ShadowPolyRectangle( } else if(num) { if(pPriv->postRefresh) (*pPriv->postRefresh)(pPriv->pScrn, num, pBoxInit); - xfree(pBoxInit); + free(pBoxInit); } SHADOW_GC_OP_EPILOGUE(pGC); @@ -1369,38 +1365,32 @@ ShadowFontToBox(BoxPtr BB, DrawablePtr pDrawable, GCPtr pGC, int x, int y, } right += pFont->info.maxbounds.rightSideBearing; BB->x1 = - max(pDrawable->x + x - left, (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->x1); + max(pDrawable->x + x - left, + RegionExtents(&((WindowPtr) pDrawable)->winSize)->x1); BB->y1 = max(pDrawable->y + y - ascent, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->y1); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->y1); BB->x2 = min(pDrawable->x + x + right, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->x2); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->x2); BB->y2 = min(pDrawable->y + y + descent, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->y2); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->y2); } else { ShadowTextExtent(pFont, count, chars, wide ? (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit : Linear8Bit, BB); BB->x1 = - max(pDrawable->x + x + BB->x1, (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->x1); + max(pDrawable->x + x + BB->x1, + RegionExtents(&((WindowPtr) pDrawable)->winSize)->x1); BB->y1 = max(pDrawable->y + y + BB->y1, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->y1); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->y1); BB->x2 = min(pDrawable->x + x + BB->x2, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->x2); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->x2); BB->y2 = min(pDrawable->y + y + BB->y2, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->y2); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->y2); } } |