diff options
author | Eric Anholt <eric@anholt.net> | 2007-09-12 13:58:46 +0000 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-09-13 00:08:53 +0000 |
commit | e4d11e58ce349dfe6af2f73ff341317f9b39684c (patch) | |
tree | 05509150343f56d8ec6c88e8da338bf99e6ec03f /miext | |
parent | 6da39c67905500ab2db00a45cda4a9f756cdde96 (diff) |
Remove the PaintWindow optimization.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive. This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it. No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
Diffstat (limited to 'miext')
-rw-r--r-- | miext/cw/cw.c | 147 | ||||
-rw-r--r-- | miext/cw/cw.h | 2 | ||||
-rwxr-xr-x | miext/damage/damage.c | 33 | ||||
-rwxr-xr-x | miext/damage/damagestr.h | 2 | ||||
-rw-r--r-- | miext/rootless/rootlessCommon.h | 2 | ||||
-rw-r--r-- | miext/rootless/rootlessScreen.c | 2 | ||||
-rw-r--r-- | miext/rootless/rootlessWindow.c | 98 | ||||
-rw-r--r-- | miext/rootless/rootlessWindow.h | 4 | ||||
-rw-r--r-- | miext/rootless/safeAlpha/Makefile.am | 3 | ||||
-rw-r--r-- | miext/rootless/safeAlpha/safeAlpha.h | 2 | ||||
-rw-r--r-- | miext/rootless/safeAlpha/safeAlphaWindow.c | 177 |
11 files changed, 4 insertions, 468 deletions
diff --git a/miext/cw/cw.c b/miext/cw/cw.c index 7ee013be1..bd49f3f0d 100644 --- a/miext/cw/cw.c +++ b/miext/cw/cw.c @@ -380,149 +380,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) @@ -654,8 +511,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); @@ -681,8 +536,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 0d57b9b9d..8e42ac256 100644 --- a/miext/cw/cw.h +++ b/miext/cw/cw.h @@ -84,8 +84,6 @@ typedef struct { GetSpansProcPtr GetSpans; CreateGCProcPtr CreateGC; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; GetWindowPixmapProcPtr GetWindowPixmap; diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 472b1b887..58f37e990 100755 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -1635,35 +1635,6 @@ damageDestroyPixmap (PixmapPtr pPixmap) } static void -damagePaintWindow(WindowPtr pWindow, - RegionPtr prgn, - int what) -{ - ScreenPtr pScreen = pWindow->drawable.pScreen; - damageScrPriv(pScreen); - - /* - * Painting background none doesn't actually *do* anything, so - * no damage is recorded - */ - if ((what != PW_BACKGROUND || pWindow->backgroundState != None) && - getWindowDamage (pWindow)) - damageDamageRegion (&pWindow->drawable, prgn, FALSE, -1); - if(what == PW_BACKGROUND) { - unwrap (pScrPriv, pScreen, PaintWindowBackground); - (*pScreen->PaintWindowBackground) (pWindow, prgn, what); - damageReportPostOp (&pWindow->drawable); - wrap (pScrPriv, pScreen, PaintWindowBackground, damagePaintWindow); - } else { - unwrap (pScrPriv, pScreen, PaintWindowBorder); - (*pScreen->PaintWindowBorder) (pWindow, prgn, what); - damageReportPostOp (&pWindow->drawable); - wrap (pScrPriv, pScreen, PaintWindowBorder, damagePaintWindow); - } -} - - -static void damageCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) @@ -1763,8 +1734,6 @@ damageCloseScreen (int i, ScreenPtr pScreen) unwrap (pScrPriv, pScreen, DestroyPixmap); unwrap (pScrPriv, pScreen, CreateGC); - unwrap (pScrPriv, pScreen, PaintWindowBackground); - unwrap (pScrPriv, pScreen, PaintWindowBorder); unwrap (pScrPriv, pScreen, CopyWindow); unwrap (pScrPriv, pScreen, CloseScreen); xfree (pScrPriv); @@ -1814,8 +1783,6 @@ DamageSetup (ScreenPtr pScreen) wrap (pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap); wrap (pScrPriv, pScreen, CreateGC, damageCreateGC); - wrap (pScrPriv, pScreen, PaintWindowBackground, damagePaintWindow); - wrap (pScrPriv, pScreen, PaintWindowBorder, damagePaintWindow); wrap (pScrPriv, pScreen, DestroyWindow, damageDestroyWindow); wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap); wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow); diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h index 1e0efad4f..e603f02a4 100755 --- a/miext/damage/damagestr.h +++ b/miext/damage/damagestr.h @@ -60,8 +60,6 @@ typedef struct _damageScrPriv { */ DamagePtr pScreenDamage; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; CloseScreenProcPtr CloseScreen; CreateGCProcPtr CreateGC; diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 3bf6af02f..66b930d36 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -86,8 +86,6 @@ typedef struct _RootlessScreenRec { ChangeWindowAttributesProcPtr ChangeWindowAttributes; CreateGCProcPtr CreateGC; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; GetImageProcPtr GetImage; SourceValidateProcPtr SourceValidate; diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index 700de6edc..0bcd2f7f1 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -598,8 +598,6 @@ RootlessWrap(ScreenPtr pScreen) WRAP(CreateScreenResources); WRAP(CloseScreen); WRAP(CreateGC); - WRAP(PaintWindowBackground); - WRAP(PaintWindowBorder); WRAP(CopyWindow); WRAP(GetImage); WRAP(SourceValidate); diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 30b7daaab..f7126590b 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -217,10 +217,8 @@ RootlessSetShape(WindowPtr pWin) /* Disallow ParentRelative background on top-level windows - because the root window doesn't really have the right background - and fb will try to draw on the root instead of on the window. - ParentRelative prevention is also in PaintWindowBackground/Border() - so it is no longer really needed here. */ + because the root window doesn't really have the right background. + */ Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask) { @@ -670,7 +668,7 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, /* * RootlessCopyWindow * Update *new* location of window. Old location is redrawn with - * PaintWindowBackground/Border. Cloned from fbCopyWindow. + * miPaintWindow. Cloned from fbCopyWindow. * The original always draws on the root pixmap, which we don't have. * Instead, draw on the parent window's pixmap. */ @@ -1326,96 +1324,6 @@ out: } } - -/* - * SetPixmapOfAncestors - * Set the Pixmaps on all ParentRelative windows up the ancestor chain. - */ -static void -SetPixmapOfAncestors(WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - WindowPtr topWin = TopLevelParent(pWin); - RootlessWindowRec *topWinRec = WINREC(topWin); - - while (pWin->backgroundState == ParentRelative) { - if (pWin == topWin) { - // disallow ParentRelative background state on top level - XID pixel = 0; - ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); - RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin); - break; - } - - pWin = pWin->parent; - pScreen->SetWindowPixmap(pWin, topWinRec->pixmap); - } -} - - -/* - * RootlessPaintWindowBackground - */ -void -RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - if (IsRoot(pWin)) - return; - - RL_DEBUG_MSG("paintwindowbackground start (win 0x%x, framed %i) ", - pWin, IsFramedWindow(pWin)); - - if (IsFramedWindow(pWin)) { - RootlessStartDrawing(pWin); - RootlessDamageRegion(pWin, pRegion); - - // For ParentRelative windows, we have to make sure the window - // pixmap is set correctly all the way up the ancestor chain. - if (pWin->backgroundState == ParentRelative) { - SetPixmapOfAncestors(pWin); - } - } - - SCREEN_UNWRAP(pScreen, PaintWindowBackground); - pScreen->PaintWindowBackground(pWin, pRegion, what); - SCREEN_WRAP(pScreen, PaintWindowBackground); - - RL_DEBUG_MSG("paintwindowbackground end\n"); -} - - -/* - * RootlessPaintWindowBorder - */ -void -RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) -{ - RL_DEBUG_MSG("paintwindowborder start (win 0x%x) ", pWin); - - if (IsFramedWindow(pWin)) { - RootlessStartDrawing(pWin); - RootlessDamageRegion(pWin, pRegion); - - // For ParentRelative windows with tiled borders, we have to make - // sure the window pixmap is set correctly all the way up the - // ancestor chain. - if (!pWin->borderIsPixel && - pWin->backgroundState == ParentRelative) - { - SetPixmapOfAncestors(pWin); - } - } - - SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder); - pWin->drawable.pScreen->PaintWindowBorder(pWin, pRegion, what); - SCREEN_WRAP(pWin->drawable.pScreen, PaintWindowBorder); - - RL_DEBUG_MSG("paintwindowborder end\n"); -} - - /* * RootlessChangeBorderWidth * FIXME: untested! diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h index 093a2b384..9573068b4 100644 --- a/miext/rootless/rootlessWindow.h +++ b/miext/rootless/rootlessWindow.h @@ -54,10 +54,6 @@ void RootlessMoveWindow(WindowPtr pWin,int x,int y,WindowPtr pSib,VTKind kind); void RootlessResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib); void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent); -void RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, - int what); -void RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, - int what); void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width); #endif diff --git a/miext/rootless/safeAlpha/Makefile.am b/miext/rootless/safeAlpha/Makefile.am index 7592c1840..823fb777d 100644 --- a/miext/rootless/safeAlpha/Makefile.am +++ b/miext/rootless/safeAlpha/Makefile.am @@ -6,7 +6,6 @@ INCLUDES = -I$(srcdir)/.. -I$(top_srcdir)/hw/xfree86/os-support noinst_LTLIBRARIES = libsafeAlpha.la -libsafeAlpha_la_SOURCES = safeAlphaPicture.c \ - safeAlphaWindow.c +libsafeAlpha_la_SOURCES = safeAlphaPicture.c EXTRA_DIST = safeAlpha.h diff --git a/miext/rootless/safeAlpha/safeAlpha.h b/miext/rootless/safeAlpha/safeAlpha.h index bd1ce3203..9b9b39c92 100644 --- a/miext/rootless/safeAlpha/safeAlpha.h +++ b/miext/rootless/safeAlpha/safeAlpha.h @@ -32,8 +32,6 @@ #include "picturestr.h" -void SafeAlphaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); - #ifdef RENDER void SafeAlphaComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, diff --git a/miext/rootless/safeAlpha/safeAlphaWindow.c b/miext/rootless/safeAlpha/safeAlphaWindow.c deleted file mode 100644 index 5226782fe..000000000 --- a/miext/rootless/safeAlpha/safeAlphaWindow.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Specialized window functions to protect the alpha channel - */ -/* - * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* Portions of this file are based on fbwindow.c, which contains the - * following copyright: - * - * Copyright © 1998 Keith Packard - */ - - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif -#include "fb.h" -#include "safeAlpha.h" -#include "rootlessCommon.h" - -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#endif - -/* - * SafeAlphaFillRegionTiled - * Fill using a tile while leaving the alpha channel untouched. - * Based on fbfillRegionTiled. - */ -void -SafeAlphaFillRegionTiled( - DrawablePtr pDrawable, - RegionPtr pRegion, - PixmapPtr pTile) -{ - FbBits *dst; - FbStride dstStride; - int dstBpp; - int dstXoff, dstYoff; - FbBits *tile; - FbStride tileStride; - int tileBpp; - int tileXoff, tileYoff; /* XXX assumed to be zero */ - int tileWidth, tileHeight; - int n = REGION_NUM_RECTS(pRegion); - BoxPtr pbox = REGION_RECTS(pRegion); - int xRot = pDrawable->x; - int yRot = pDrawable->y; - FbBits planeMask; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) - { - int index = pDrawable->pScreen->myNum; - if(&WindowTable[index]->drawable == pDrawable) - { - xRot -= panoramiXdataPtr[index].x; - yRot -= panoramiXdataPtr[index].y; - } - } -#endif - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); - fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, - tileXoff, tileYoff); - tileWidth = pTile->drawable.width; - tileHeight = pTile->drawable.height; - xRot += dstXoff; - yRot += dstYoff; - planeMask = FB_ALLONES & ~RootlessAlphaMask(dstBpp); - - while (n--) - { - fbTile (dst + (pbox->y1 + dstYoff) * dstStride, - dstStride, - (pbox->x1 + dstXoff) * dstBpp, - (pbox->x2 - pbox->x1) * dstBpp, - pbox->y2 - pbox->y1, - tile, - tileStride, - tileWidth * dstBpp, - tileHeight, - GXcopy, - planeMask, - dstBpp, - xRot * dstBpp, - yRot - pbox->y1); - pbox++; - } -} - - -/* - * SafeAlphaPaintWindow - * Paint the window while filling in the alpha channel with all on. - * We can't use fbPaintWindow because it zeros the alpha channel. - */ -void -SafeAlphaPaintWindow( - WindowPtr pWin, - RegionPtr pRegion, - int what) -{ - switch (what) { - case PW_BACKGROUND: - - switch (pWin->backgroundState) { - case None: - break; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - break; - case BackgroundPixmap: - SafeAlphaFillRegionTiled (&pWin->drawable, - pRegion, - pWin->background.pixmap); - break; - case BackgroundPixel: - { - Pixel pixel = pWin->background.pixel | - RootlessAlphaMask(pWin->drawable.bitsPerPixel); - fbFillRegionSolid (&pWin->drawable, pRegion, 0, - fbReplicatePixel (pixel, - pWin->drawable.bitsPerPixel)); - break; - } - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - { - Pixel pixel = pWin->border.pixel | - RootlessAlphaMask(pWin->drawable.bitsPerPixel); - fbFillRegionSolid (&pWin->drawable, pRegion, 0, - fbReplicatePixel (pixel, - pWin->drawable.bitsPerPixel)); - } - else - { - WindowPtr pBgWin; - for (pBgWin = pWin; pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - - SafeAlphaFillRegionTiled (&pBgWin->drawable, - pRegion, - pWin->border.pixmap); - } - break; - } - fbValidateDrawable (&pWin->drawable); -} |