diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-09-19 07:25:55 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-09-19 07:25:55 -0400 |
commit | 97c150b61bbe436453b05d3c07cd2173870aac40 (patch) | |
tree | 5335d0df93703e7ca8617cfae57315709d032a29 /miext/cw | |
parent | 57907e0943da0c3fd3bf6c128d210b544629ce72 (diff) | |
parent | 547ad2125ece93bbe01f6d09a3baf176ebd16bb3 (diff) |
Merge branch 'master' into XACE-SELINUX
Conflicts:
afb/afbpntwin.c
afb/afbscrinit.c
afb/afbwindow.c
cfb/cfb.h
cfb/cfballpriv.c
cfb/cfbscrinit.c
cfb/cfbwindow.c
configure.ac
fb/wfbrename.h
hw/xfree86/xf4bpp/ppcIO.c
hw/xfree86/xf4bpp/ppcPntWin.c
hw/xfree86/xf4bpp/ppcWindow.c
hw/xfree86/xf8_32bpp/cfbscrinit.c
mfb/mfb.h
mfb/mfbpntwin.c
mfb/mfbscrinit.c
mfb/mfbwindow.c
mi/miexpose.c
Note: conflicts caused by devPrivates rework vs. paintwindow changes.
Diffstat (limited to 'miext/cw')
-rw-r--r-- | miext/cw/cw.c | 147 | ||||
-rw-r--r-- | miext/cw/cw.h | 2 |
2 files changed, 0 insertions, 149 deletions
diff --git a/miext/cw/cw.c b/miext/cw/cw.c index df4b121d8..efb046948 100644 --- a/miext/cw/cw.c +++ b/miext/cw/cw.c @@ -379,149 +379,6 @@ cwGetSpans(DrawablePtr pSrc, int wMax, DDXPointPtr ppt, int *pwidth, SCREEN_EPILOGUE(pScreen, GetSpans, cwGetSpans); } -static void -cwFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, unsigned long pixel) -{ - ScreenPtr pScreen = pDrawable->pScreen; - GCPtr pGC; - BoxPtr pBox; - int nbox, i; - ChangeGCVal v[3]; - - pGC = GetScratchGC(pDrawable->depth, pScreen); - v[0].val = GXcopy; - v[1].val = pixel; - v[2].val = FillSolid; - dixChangeGC(NullClient, pGC, (GCFunction | GCForeground | GCFillStyle), - NULL, v); - ValidateGC(pDrawable, pGC); - - pBox = REGION_RECTS(pRegion); - nbox = REGION_NUM_RECTS(pRegion); - - for (i = 0; i < nbox; i++, pBox++) { - xRectangle rect; - rect.x = pBox->x1; - rect.y = pBox->y1; - rect.width = pBox->x2 - pBox->x1; - rect.height = pBox->y2 - pBox->y1; - (*pGC->ops->PolyFillRect)(pDrawable, pGC, 1, &rect); - } - - FreeScratchGC(pGC); -} - -static void -cwFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, - int x_off, int y_off) -{ - ScreenPtr pScreen = pDrawable->pScreen; - GCPtr pGC; - BoxPtr pBox; - int nbox, i; - ChangeGCVal v[5]; - - pGC = GetScratchGC(pDrawable->depth, pScreen); - v[0].val = GXcopy; - v[1].val = FillTiled; - v[2].ptr = (pointer) pTile; - v[3].val = x_off; - v[4].val = y_off; - dixChangeGC(NullClient, pGC, (GCFunction | GCFillStyle | GCTile | - GCTileStipXOrigin | GCTileStipYOrigin), NULL, v); - - ValidateGC(pDrawable, pGC); - - pBox = REGION_RECTS(pRegion); - nbox = REGION_NUM_RECTS(pRegion); - - for (i = 0; i < nbox; i++, pBox++) { - xRectangle rect; - rect.x = pBox->x1; - rect.y = pBox->y1; - rect.width = pBox->x2 - pBox->x1; - rect.height = pBox->y2 - pBox->y1; - (*pGC->ops->PolyFillRect)(pDrawable, pGC, 1, &rect); - } - - FreeScratchGC(pGC); -} - -static void -cwPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - SCREEN_PROLOGUE(pScreen, PaintWindowBackground); - - if (!cwDrawableIsRedirWindow((DrawablePtr)pWin)) { - (*pScreen->PaintWindowBackground)(pWin, pRegion, what); - } else { - DrawablePtr pBackingDrawable; - int x_off, y_off, x_screen, y_screen; - - while (pWin->backgroundState == ParentRelative) - pWin = pWin->parent; - - pBackingDrawable = cwGetBackingDrawable((DrawablePtr)pWin, &x_off, - &y_off); - - x_screen = x_off - pWin->drawable.x; - y_screen = y_off - pWin->drawable.y; - - if (pWin && (pWin->backgroundState == BackgroundPixel || - pWin->backgroundState == BackgroundPixmap)) - { - REGION_TRANSLATE(pScreen, pRegion, x_screen, y_screen); - - if (pWin->backgroundState == BackgroundPixel) { - cwFillRegionSolid(pBackingDrawable, pRegion, - pWin->background.pixel); - } else { - cwFillRegionTiled(pBackingDrawable, pRegion, - pWin->background.pixmap, x_off, y_off); - } - - REGION_TRANSLATE(pScreen, pRegion, -x_screen, -y_screen); - } - } - - SCREEN_EPILOGUE(pScreen, PaintWindowBackground, cwPaintWindowBackground); -} - -static void -cwPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - SCREEN_PROLOGUE(pScreen, PaintWindowBorder); - - if (!cwDrawableIsRedirWindow((DrawablePtr)pWin)) { - (*pScreen->PaintWindowBorder)(pWin, pRegion, what); - } else { - DrawablePtr pBackingDrawable; - int x_off, y_off, x_screen, y_screen; - - pBackingDrawable = cwGetBackingDrawable((DrawablePtr)pWin, &x_off, - &y_off); - - x_screen = x_off - pWin->drawable.x; - y_screen = y_off - pWin->drawable.y; - - REGION_TRANSLATE(pScreen, pRegion, x_screen, y_screen); - - if (pWin->borderIsPixel) { - cwFillRegionSolid(pBackingDrawable, pRegion, pWin->border.pixel); - } else { - cwFillRegionTiled(pBackingDrawable, pRegion, pWin->border.pixmap, - x_off, y_off); - } - - REGION_TRANSLATE(pScreen, pRegion, -x_screen, -y_screen); - } - - SCREEN_EPILOGUE(pScreen, PaintWindowBorder, cwPaintWindowBorder); -} static void cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) @@ -633,8 +490,6 @@ miInitializeCompositeWrapper(ScreenPtr pScreen) SCREEN_EPILOGUE(pScreen, GetImage, cwGetImage); SCREEN_EPILOGUE(pScreen, GetSpans, cwGetSpans); SCREEN_EPILOGUE(pScreen, CreateGC, cwCreateGC); - SCREEN_EPILOGUE(pScreen, PaintWindowBackground, cwPaintWindowBackground); - SCREEN_EPILOGUE(pScreen, PaintWindowBorder, cwPaintWindowBorder); SCREEN_EPILOGUE(pScreen, CopyWindow, cwCopyWindow); SCREEN_EPILOGUE(pScreen, SetWindowPixmap, cwSetWindowPixmap); @@ -660,8 +515,6 @@ cwCloseScreen (int i, ScreenPtr pScreen) pScreen->GetImage = pScreenPriv->GetImage; pScreen->GetSpans = pScreenPriv->GetSpans; pScreen->CreateGC = pScreenPriv->CreateGC; - pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground; - pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder; pScreen->CopyWindow = pScreenPriv->CopyWindow; #ifdef RENDER diff --git a/miext/cw/cw.h b/miext/cw/cw.h index 45247d670..47c4ee3b8 100644 --- a/miext/cw/cw.h +++ b/miext/cw/cw.h @@ -85,8 +85,6 @@ typedef struct { GetSpansProcPtr GetSpans; CreateGCProcPtr CreateGC; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; GetWindowPixmapProcPtr GetWindowPixmap; |