summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-09-19 07:25:55 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-09-19 07:25:55 -0400
commit97c150b61bbe436453b05d3c07cd2173870aac40 (patch)
tree5335d0df93703e7ca8617cfae57315709d032a29 /miext
parent57907e0943da0c3fd3bf6c128d210b544629ce72 (diff)
parent547ad2125ece93bbe01f6d09a3baf176ebd16bb3 (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')
-rw-r--r--miext/cw/cw.c147
-rw-r--r--miext/cw/cw.h2
-rwxr-xr-xmiext/damage/damage.c39
-rwxr-xr-xmiext/damage/damage.h3
-rwxr-xr-xmiext/damage/damagestr.h2
-rw-r--r--miext/rootless/rootlessCommon.h2
-rw-r--r--miext/rootless/rootlessScreen.c2
-rw-r--r--miext/rootless/rootlessWindow.c98
-rw-r--r--miext/rootless/rootlessWindow.h4
-rw-r--r--miext/rootless/safeAlpha/Makefile.am3
-rw-r--r--miext/rootless/safeAlpha/safeAlpha.h2
-rw-r--r--miext/rootless/safeAlpha/safeAlphaWindow.c177
12 files changed, 13 insertions, 468 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;
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index b7f6fb550..350819be3 100755
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1634,35 +1634,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)
@@ -1762,8 +1733,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);
@@ -1793,8 +1762,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);
@@ -1966,6 +1933,12 @@ DamageRegion (DamagePtr pDamage)
return &pDamage->damage;
}
+_X_EXPORT RegionPtr
+DamagePendingRegion (DamagePtr pDamage)
+{
+ return &pDamage->pendingDamage;
+}
+
_X_EXPORT void
DamageDamageRegion (DrawablePtr pDrawable,
RegionPtr pRegion)
diff --git a/miext/damage/damage.h b/miext/damage/damage.h
index 4cfc8127d..102da6ebe 100755
--- a/miext/damage/damage.h
+++ b/miext/damage/damage.h
@@ -75,6 +75,9 @@ DamageEmpty (DamagePtr pDamage);
RegionPtr
DamageRegion (DamagePtr pDamage);
+RegionPtr
+DamagePendingRegion (DamagePtr pDamage);
+
void
DamageDamageRegion (DrawablePtr pDrawable,
const RegionPtr pRegion);
diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h
index 9f3dd6684..2f6d53844 100755
--- a/miext/damage/damagestr.h
+++ b/miext/damage/damagestr.h
@@ -61,8 +61,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 5ebe35e63..537ffdae4 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 f647893de..06ba53a4b 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -583,8 +583,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 687748c2d..512a4949f 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);
-}