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.
This commit is contained in:
parent
6da39c6790
commit
e4d11e58ce
|
@ -504,7 +504,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
|
||||||
|
|
||||||
REGION_INTERSECT(pScreen, ®, ®, &pBuffer->clipList);
|
REGION_INTERSECT(pScreen, ®, ®, &pBuffer->clipList);
|
||||||
if (pBuffer->backgroundState != None)
|
if (pBuffer->backgroundState != None)
|
||||||
(*pScreen->PaintWindowBackground)(pBuffer, ®, PW_BACKGROUND);
|
miPaintWindow(pBuffer, ®, PW_BACKGROUND);
|
||||||
if (generateExposures)
|
if (generateExposures)
|
||||||
MultibufferExpose(pMBBuffer, ®);
|
MultibufferExpose(pMBBuffer, ®);
|
||||||
#ifdef _notdef
|
#ifdef _notdef
|
||||||
|
@ -517,7 +517,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
|
||||||
if (generateExposures)
|
if (generateExposures)
|
||||||
(*pScreen->WindowExposures)(pBuffer, ®, pBSReg);
|
(*pScreen->WindowExposures)(pBuffer, ®, pBSReg);
|
||||||
else if (pBuffer->backgroundState != None)
|
else if (pBuffer->backgroundState != None)
|
||||||
(*pScreen->PaintWindowBackground)(pBuffer, ®, PW_BACKGROUND);
|
miPaintWindow(pBuffer, ®, PW_BACKGROUND);
|
||||||
#endif
|
#endif
|
||||||
REGION_UNINIT(pScreen, ®);
|
REGION_UNINIT(pScreen, ®);
|
||||||
if (pBSReg)
|
if (pBSReg)
|
||||||
|
@ -836,8 +836,7 @@ bufClipNotify(pWin, dx,dy)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Updates buffer's background fields when the window's changes.
|
* Updates buffer's background fields when the window's changes.
|
||||||
* This is necessary because pScreen->PaintWindowBackground
|
* This is necessary because miPaintWindow is used to paint the buffer.
|
||||||
* is used to paint the buffer.
|
|
||||||
*
|
*
|
||||||
* XXBS - Backingstore state will have be tracked too if it is supported.
|
* XXBS - Backingstore state will have be tracked too if it is supported.
|
||||||
*/
|
*/
|
||||||
|
@ -927,7 +926,7 @@ bufWindowExposures(pWin, prgn, other_exposed)
|
||||||
pBuffer = (BufferPtr) pMBBuffer->pDrawable;
|
pBuffer = (BufferPtr) pMBBuffer->pDrawable;
|
||||||
|
|
||||||
if (i != pMBWindow->displayedMultibuffer)
|
if (i != pMBWindow->displayedMultibuffer)
|
||||||
(* pScreen->PaintWindowBackground)(pBuffer,&tmp_rgn,PW_BACKGROUND);
|
miPaintWindow(pBuffer, &tmp_rgn, PW_BACKGROUND);
|
||||||
if ((pMBBuffer->otherEventMask | pMBBuffer->eventMask) & ExposureMask)
|
if ((pMBBuffer->otherEventMask | pMBBuffer->eventMask) & ExposureMask)
|
||||||
MultibufferExpose(pMBBuffer, &tmp_rgn);
|
MultibufferExpose(pMBBuffer, &tmp_rgn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC
|
||||||
|
|
||||||
DISTCLEANFILES = $(libafb_gen_sources)
|
DISTCLEANFILES = $(libafb_gen_sources)
|
||||||
|
|
||||||
libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpntwin.c afbpixmap.c \
|
libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpixmap.c \
|
||||||
afbimage.c afbline.c afbbres.c afbhrzvert.c afbbresd.c afbpushpxl.c afbply1rct.c \
|
afbimage.c afbline.c afbbres.c afbhrzvert.c afbbresd.c afbpushpxl.c afbply1rct.c \
|
||||||
afbzerarc.c afbfillarc.c afbfillsp.c afbsetsp.c afbscrinit.c afbplygblt.c \
|
afbzerarc.c afbfillarc.c afbfillsp.c afbsetsp.c afbscrinit.c afbplygblt.c \
|
||||||
afbclip.c afbgetsp.c afbpolypnt.c afbbitblt.c afbcmap.c afbimggblt.c afbpntarea.c \
|
afbclip.c afbgetsp.c afbpolypnt.c afbbitblt.c afbcmap.c afbimggblt.c afbpntarea.c \
|
||||||
|
|
15
afb/afb.h
15
afb/afb.h
|
@ -506,11 +506,6 @@ extern void afbCopyRotatePixmap(
|
||||||
int /*xrot*/,
|
int /*xrot*/,
|
||||||
int /*yrot*/
|
int /*yrot*/
|
||||||
);
|
);
|
||||||
extern void afbPaintWindow(
|
|
||||||
WindowPtr /*pWin*/,
|
|
||||||
RegionPtr /*pRegion*/,
|
|
||||||
int /*what*/
|
|
||||||
);
|
|
||||||
/* afbpolypnt.c */
|
/* afbpolypnt.c */
|
||||||
|
|
||||||
extern void afbPolyPoint(
|
extern void afbPolyPoint(
|
||||||
|
@ -744,16 +739,6 @@ extern int frameWindowPrivateIndex; /* index into Window private array */
|
||||||
#define afbGetGCPrivate(pGC) \
|
#define afbGetGCPrivate(pGC) \
|
||||||
((afbPrivGC *)((pGC)->devPrivates[afbGCPrivateIndex].ptr))
|
((afbPrivGC *)((pGC)->devPrivates[afbGCPrivateIndex].ptr))
|
||||||
|
|
||||||
/* private field of window */
|
|
||||||
typedef struct {
|
|
||||||
unsigned char fastBorder; /* non-zero if border tile is 32 bits wide */
|
|
||||||
unsigned char fastBackground;
|
|
||||||
unsigned short unused; /* pad for alignment with Sun compiler */
|
|
||||||
DDXPointRec oldRotate;
|
|
||||||
PixmapPtr pRotatedBackground;
|
|
||||||
PixmapPtr pRotatedBorder;
|
|
||||||
} afbPrivWin;
|
|
||||||
|
|
||||||
/* Common macros for extracting drawing information */
|
/* Common macros for extracting drawing information */
|
||||||
|
|
||||||
#define afbGetTypedWidth(pDrawable,wtype)( \
|
#define afbGetTypedWidth(pDrawable,wtype)( \
|
||||||
|
|
126
afb/afbpntwin.c
126
afb/afbpntwin.c
|
@ -1,126 +0,0 @@
|
||||||
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
|
|
||||||
/***********************************************************
|
|
||||||
|
|
||||||
Copyright (c) 1987 X Consortium
|
|
||||||
|
|
||||||
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
|
|
||||||
X CONSORTIUM 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 of the X Consortium shall not be
|
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
|
||||||
in this Software without prior written authorization from the X Consortium.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
||||||
|
|
||||||
All Rights Reserved
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
|
||||||
documentation for any purpose and without fee is hereby granted,
|
|
||||||
provided that the above copyright notice appear in all copies and that
|
|
||||||
both that copyright notice and this permission notice appear in
|
|
||||||
supporting documentation, and that the name of Digital not be
|
|
||||||
used in advertising or publicity pertaining to distribution of the
|
|
||||||
software without specific, written prior permission.
|
|
||||||
|
|
||||||
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
||||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
||||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
||||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
******************************************************************/
|
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
|
||||||
|
|
||||||
#include "windowstr.h"
|
|
||||||
#include "regionstr.h"
|
|
||||||
#include "pixmapstr.h"
|
|
||||||
#include "scrnintstr.h"
|
|
||||||
|
|
||||||
#include "afb.h"
|
|
||||||
#include "maskbits.h"
|
|
||||||
#include "mi.h"
|
|
||||||
|
|
||||||
void
|
|
||||||
afbPaintWindow(pWin, pRegion, what)
|
|
||||||
WindowPtr pWin;
|
|
||||||
RegionPtr pRegion;
|
|
||||||
int what;
|
|
||||||
{
|
|
||||||
register afbPrivWin *pPrivWin;
|
|
||||||
unsigned char rrops[AFB_MAX_DEPTH];
|
|
||||||
|
|
||||||
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
|
|
||||||
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
if (pPrivWin->fastBackground) {
|
|
||||||
afbTileAreaPPWCopy((DrawablePtr)pWin,
|
|
||||||
REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXcopy,
|
|
||||||
pPrivWin->pRotatedBackground, ~0);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
afbTileAreaCopy((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXcopy,
|
|
||||||
pWin->background.pixmap, 0, 0, ~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
afbReduceRop(GXcopy, pWin->background.pixel, ~0,
|
|
||||||
pWin->drawable.depth, rrops);
|
|
||||||
afbSolidFillArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), rrops);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel) {
|
|
||||||
afbReduceRop(GXcopy, pWin->border.pixel, ~0, pWin->drawable.depth,
|
|
||||||
rrops);
|
|
||||||
afbSolidFillArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), rrops);
|
|
||||||
return;
|
|
||||||
} else if (pPrivWin->fastBorder) {
|
|
||||||
afbTileAreaPPWCopy((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXcopy,
|
|
||||||
pPrivWin->pRotatedBorder, ~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
miPaintWindow(pWin, pRegion, what);
|
|
||||||
}
|
|
|
@ -71,7 +71,6 @@ SOFTWARE.
|
||||||
#ifdef PIXMAP_PER_WINDOW
|
#ifdef PIXMAP_PER_WINDOW
|
||||||
int frameWindowPrivateIndex;
|
int frameWindowPrivateIndex;
|
||||||
#endif
|
#endif
|
||||||
int afbWindowPrivateIndex;
|
|
||||||
int afbGCPrivateIndex;
|
int afbGCPrivateIndex;
|
||||||
int afbScreenPrivateIndex;
|
int afbScreenPrivateIndex;
|
||||||
|
|
||||||
|
@ -140,20 +139,16 @@ afbAllocatePrivates(ScreenPtr pScreen, int *pWinIndex, int *pGCIndex)
|
||||||
#ifdef PIXMAP_PER_WINDOW
|
#ifdef PIXMAP_PER_WINDOW
|
||||||
frameWindowPrivateIndex = AllocateWindowPrivateIndex();
|
frameWindowPrivateIndex = AllocateWindowPrivateIndex();
|
||||||
#endif
|
#endif
|
||||||
afbWindowPrivateIndex = AllocateWindowPrivateIndex();
|
|
||||||
afbGCPrivateIndex = AllocateGCPrivateIndex();
|
afbGCPrivateIndex = AllocateGCPrivateIndex();
|
||||||
afbGeneration = serverGeneration;
|
afbGeneration = serverGeneration;
|
||||||
}
|
}
|
||||||
if (pWinIndex)
|
|
||||||
*pWinIndex = afbWindowPrivateIndex;
|
|
||||||
if (pGCIndex)
|
if (pGCIndex)
|
||||||
*pGCIndex = afbGCPrivateIndex;
|
*pGCIndex = afbGCPrivateIndex;
|
||||||
|
|
||||||
afbScreenPrivateIndex = AllocateScreenPrivateIndex();
|
afbScreenPrivateIndex = AllocateScreenPrivateIndex();
|
||||||
pScreen->GetWindowPixmap = afbGetWindowPixmap;
|
pScreen->GetWindowPixmap = afbGetWindowPixmap;
|
||||||
pScreen->SetWindowPixmap = afbSetWindowPixmap;
|
pScreen->SetWindowPixmap = afbSetWindowPixmap;
|
||||||
return(AllocateWindowPrivate(pScreen, afbWindowPrivateIndex, sizeof(afbPrivWin)) &&
|
return(AllocateGCPrivate(pScreen, afbGCPrivateIndex, sizeof(afbPrivGC)));
|
||||||
AllocateGCPrivate(pScreen, afbGCPrivateIndex, sizeof(afbPrivGC)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
|
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
|
||||||
|
@ -198,8 +193,6 @@ afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, i
|
||||||
pScreen->ChangeWindowAttributes = afbChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = afbChangeWindowAttributes;
|
||||||
pScreen->RealizeWindow = afbMapWindow;
|
pScreen->RealizeWindow = afbMapWindow;
|
||||||
pScreen->UnrealizeWindow = afbUnmapWindow;
|
pScreen->UnrealizeWindow = afbUnmapWindow;
|
||||||
pScreen->PaintWindowBackground = afbPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = afbPaintWindow;
|
|
||||||
pScreen->CopyWindow = afbCopyWindow;
|
pScreen->CopyWindow = afbCopyWindow;
|
||||||
pScreen->CreatePixmap = afbCreatePixmap;
|
pScreen->CreatePixmap = afbCreatePixmap;
|
||||||
pScreen->DestroyPixmap = afbDestroyPixmap;
|
pScreen->DestroyPixmap = afbDestroyPixmap;
|
||||||
|
|
163
afb/afbwindow.c
163
afb/afbwindow.c
|
@ -62,39 +62,16 @@ SOFTWARE.
|
||||||
#include "maskbits.h"
|
#include "maskbits.h"
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
afbCreateWindow(pWin)
|
afbCreateWindow(WindowPtr pWin)
|
||||||
register WindowPtr pWin;
|
|
||||||
{
|
{
|
||||||
register afbPrivWin *pPrivWin;
|
|
||||||
|
|
||||||
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
|
|
||||||
pPrivWin->pRotatedBorder = NullPixmap;
|
|
||||||
pPrivWin->pRotatedBackground = NullPixmap;
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
#ifdef PIXMAP_PER_WINDOW
|
|
||||||
pWin->devPrivates[frameWindowPrivateIndex].ptr =
|
|
||||||
pWin->pDrawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This always returns true, because Xfree can't fail. It might be possible
|
/* This always returns true, because Xfree can't fail. It might be possible
|
||||||
* on some devices for Destroy to fail */
|
* on some devices for Destroy to fail */
|
||||||
Bool
|
Bool
|
||||||
afbDestroyWindow(pWin)
|
afbDestroyWindow(WindowPtr pWin)
|
||||||
WindowPtr pWin;
|
|
||||||
{
|
{
|
||||||
register afbPrivWin *pPrivWin;
|
|
||||||
|
|
||||||
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
|
|
||||||
|
|
||||||
if (pPrivWin->pRotatedBorder)
|
|
||||||
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder);
|
|
||||||
if (pPrivWin->pRotatedBackground)
|
|
||||||
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground);
|
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,46 +83,10 @@ afbMapWindow(pWindow)
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (x, y) is the upper left corner of the window on the screen
|
|
||||||
do we really need to pass this? (is it a;ready in pWin->absCorner?)
|
|
||||||
we only do the rotation for pixmaps that are 32 bits wide (padded
|
|
||||||
or otherwise.)
|
|
||||||
afbChangeWindowAttributes() has already put a copy of the pixmap
|
|
||||||
in pPrivWin->pRotated*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
Bool
|
Bool
|
||||||
afbPositionWindow(pWin, x, y)
|
afbPositionWindow(WindowPtr pWin, int x, int y)
|
||||||
WindowPtr pWin;
|
|
||||||
int x, y;
|
|
||||||
{
|
{
|
||||||
register afbPrivWin *pPrivWin;
|
|
||||||
int reset = 0;
|
|
||||||
|
|
||||||
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
|
|
||||||
if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground) {
|
|
||||||
afbXRotatePixmap(pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
afbYRotatePixmap(pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
reset = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pWin->borderIsPixel && pPrivWin->fastBorder) {
|
|
||||||
while (pWin->backgroundState == ParentRelative)
|
|
||||||
pWin = pWin->parent;
|
|
||||||
afbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
afbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
reset = 1;
|
|
||||||
}
|
|
||||||
if (reset) {
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is the "wrong" fix to the right problem, but it doesn't really
|
/* This is the "wrong" fix to the right problem, but it doesn't really
|
||||||
* cost very much. When the window is moved, we need to invalidate any
|
* cost very much. When the window is moved, we need to invalidate any
|
||||||
* RotatedPixmap that exists in any GC currently validated against this
|
* RotatedPixmap that exists in any GC currently validated against this
|
||||||
|
@ -215,104 +156,8 @@ afbCopyWindow(pWin, ptOldOrg, prgnSrc)
|
||||||
REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
|
REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* swap in correct PaintWindow* routine. If we can use a fast output
|
|
||||||
routine (i.e. the pixmap is paddable to 32 bits), also pre-rotate a copy
|
|
||||||
of it in devPrivate.
|
|
||||||
*/
|
|
||||||
Bool
|
Bool
|
||||||
afbChangeWindowAttributes(pWin, mask)
|
afbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
||||||
register WindowPtr pWin;
|
|
||||||
register unsigned long mask;
|
|
||||||
{
|
{
|
||||||
register unsigned long index;
|
|
||||||
register afbPrivWin *pPrivWin;
|
|
||||||
WindowPtr pBgWin;
|
|
||||||
|
|
||||||
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
|
|
||||||
/*
|
|
||||||
* When background state changes from ParentRelative and
|
|
||||||
* we had previously rotated the fast border pixmap to match
|
|
||||||
* the parent relative origin, rerotate to match window
|
|
||||||
*/
|
|
||||||
if (mask & (CWBackPixmap | CWBackPixel) &&
|
|
||||||
pWin->backgroundState != ParentRelative && pPrivWin->fastBorder &&
|
|
||||||
(pPrivWin->oldRotate.x != pWin->drawable.x ||
|
|
||||||
pPrivWin->oldRotate.y != pWin->drawable.y)) {
|
|
||||||
afbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
afbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
}
|
|
||||||
while(mask) {
|
|
||||||
index = lowbit (mask);
|
|
||||||
mask &= ~index;
|
|
||||||
switch(index) {
|
|
||||||
case CWBackPixmap:
|
|
||||||
if (pWin->backgroundState == None)
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
else if (pWin->backgroundState == ParentRelative) {
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
/* Rotate border to match parent origin */
|
|
||||||
if (pPrivWin->pRotatedBorder) {
|
|
||||||
for (pBgWin = pWin->parent;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
afbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
afbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
pPrivWin->oldRotate.x = pBgWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pBgWin->drawable.y;
|
|
||||||
}
|
|
||||||
} else if ((pWin->background.pixmap->drawable.width <= PPW) &&
|
|
||||||
!(pWin->background.pixmap->drawable.width &
|
|
||||||
(pWin->background.pixmap->drawable.width - 1))) {
|
|
||||||
afbCopyRotatePixmap(pWin->background.pixmap,
|
|
||||||
&pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.x, pWin->drawable.y);
|
|
||||||
if (pPrivWin->pRotatedBackground) {
|
|
||||||
pPrivWin->fastBackground = TRUE;
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
} else
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
} else
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CWBackPixel:
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CWBorderPixmap:
|
|
||||||
if ((pWin->border.pixmap->drawable.width <= PPW) &&
|
|
||||||
!(pWin->border.pixmap->drawable.width &
|
|
||||||
(pWin->border.pixmap->drawable.width - 1))) {
|
|
||||||
for (pBgWin = pWin;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
afbCopyRotatePixmap(pWin->border.pixmap,
|
|
||||||
&pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.x, pBgWin->drawable.y);
|
|
||||||
if (pPrivWin->pRotatedBorder) {
|
|
||||||
pPrivWin->fastBorder = TRUE;
|
|
||||||
pPrivWin->oldRotate.x = pBgWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pBgWin->drawable.y;
|
|
||||||
} else
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
} else
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
break;
|
|
||||||
case CWBorderPixel:
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Again, we have no failure modes indicated by any of the routines
|
|
||||||
* we've called, so we have to assume it worked */
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ DISTCLEANFILES = $(libcfb_gen_sources)
|
||||||
CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
|
CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
|
||||||
|
|
||||||
libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \
|
libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \
|
||||||
$(top_srcdir)/cfb/cfbwindow.c $(top_srcdir)/cfb/cfbpntwin.c \
|
$(top_srcdir)/cfb/cfbwindow.c \
|
||||||
$(top_srcdir)/cfb/cfbmskbits.c $(top_srcdir)/cfb/cfbpixmap.c \
|
$(top_srcdir)/cfb/cfbmskbits.c $(top_srcdir)/cfb/cfbpixmap.c \
|
||||||
$(top_srcdir)/cfb/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \
|
$(top_srcdir)/cfb/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \
|
||||||
$(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \
|
$(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \
|
||||||
|
|
37
cfb/cfb.h
37
cfb/cfb.h
|
@ -56,7 +56,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int cfbGCPrivateIndex;
|
extern int cfbGCPrivateIndex;
|
||||||
extern int cfbWindowPrivateIndex;
|
|
||||||
|
|
||||||
/* private field of GC */
|
/* private field of GC */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -81,20 +80,6 @@ typedef struct {
|
||||||
CfbBits xor, and;
|
CfbBits xor, and;
|
||||||
} cfbRRopRec, *cfbRRopPtr;
|
} cfbRRopRec, *cfbRRopPtr;
|
||||||
|
|
||||||
/* private field of window */
|
|
||||||
typedef struct {
|
|
||||||
unsigned char fastBorder; /* non-zero if border is 32 bits wide */
|
|
||||||
unsigned char fastBackground;
|
|
||||||
unsigned short unused; /* pad for alignment with Sun compiler */
|
|
||||||
DDXPointRec oldRotate;
|
|
||||||
PixmapPtr pRotatedBackground;
|
|
||||||
PixmapPtr pRotatedBorder;
|
|
||||||
} cfbPrivWin;
|
|
||||||
|
|
||||||
#define cfbGetWindowPrivate(_pWin) ((cfbPrivWin *)\
|
|
||||||
(_pWin)->devPrivates[cfbWindowPrivateIndex].ptr)
|
|
||||||
|
|
||||||
|
|
||||||
/* cfb8bit.c */
|
/* cfb8bit.c */
|
||||||
|
|
||||||
extern int cfbSetStipple(
|
extern int cfbSetStipple(
|
||||||
|
@ -313,7 +298,6 @@ extern int cfb8SegmentSS1RectXor(
|
||||||
|
|
||||||
extern Bool cfbAllocatePrivates(
|
extern Bool cfbAllocatePrivates(
|
||||||
ScreenPtr /*pScreen*/,
|
ScreenPtr /*pScreen*/,
|
||||||
int * /*window_index*/,
|
|
||||||
int * /*gc_index*/
|
int * /*gc_index*/
|
||||||
);
|
);
|
||||||
/* cfbbitblt.c */
|
/* cfbbitblt.c */
|
||||||
|
@ -806,27 +790,6 @@ extern void cfbFillPoly1RectGeneral(
|
||||||
int /*count*/,
|
int /*count*/,
|
||||||
DDXPointPtr /*ptsIn*/
|
DDXPointPtr /*ptsIn*/
|
||||||
);
|
);
|
||||||
/* cfbpntwin.c */
|
|
||||||
|
|
||||||
extern void cfbPaintWindow(
|
|
||||||
WindowPtr /*pWin*/,
|
|
||||||
RegionPtr /*pRegion*/,
|
|
||||||
int /*what*/
|
|
||||||
);
|
|
||||||
|
|
||||||
extern void cfbFillBoxSolid(
|
|
||||||
DrawablePtr /*pDrawable*/,
|
|
||||||
int /*nBox*/,
|
|
||||||
BoxPtr /*pBox*/,
|
|
||||||
unsigned long /*pixel*/
|
|
||||||
);
|
|
||||||
|
|
||||||
extern void cfbFillBoxTile32(
|
|
||||||
DrawablePtr /*pDrawable*/,
|
|
||||||
int /*nBox*/,
|
|
||||||
BoxPtr /*pBox*/,
|
|
||||||
PixmapPtr /*tile*/
|
|
||||||
);
|
|
||||||
/* cfbpolypnt.c */
|
/* cfbpolypnt.c */
|
||||||
|
|
||||||
extern void cfbPolyPoint(
|
extern void cfbPolyPoint(
|
||||||
|
|
|
@ -45,7 +45,6 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "mibstore.h"
|
#include "mibstore.h"
|
||||||
|
|
||||||
#if 1 || PSZ==8
|
#if 1 || PSZ==8
|
||||||
int cfbWindowPrivateIndex = -1;
|
|
||||||
int cfbGCPrivateIndex = -1;
|
int cfbGCPrivateIndex = -1;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CFB_NEED_SCREEN_PRIVATE
|
#ifdef CFB_NEED_SCREEN_PRIVATE
|
||||||
|
@ -55,29 +54,20 @@ static unsigned long cfbGeneration = 0;
|
||||||
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
cfbAllocatePrivates(pScreen, window_index, gc_index)
|
cfbAllocatePrivates(ScreenPtr pScreen, int *gc_index)
|
||||||
ScreenPtr pScreen;
|
|
||||||
int *window_index, *gc_index;
|
|
||||||
{
|
{
|
||||||
if (!window_index || !gc_index ||
|
if (!gc_index || *gc_index == -1)
|
||||||
(*window_index == -1 && *gc_index == -1))
|
|
||||||
{
|
{
|
||||||
if (!mfbAllocatePrivates(pScreen,
|
if (!mfbAllocatePrivates(pScreen, &cfbGCPrivateIndex))
|
||||||
&cfbWindowPrivateIndex, &cfbGCPrivateIndex))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (window_index)
|
|
||||||
*window_index = cfbWindowPrivateIndex;
|
|
||||||
if (gc_index)
|
if (gc_index)
|
||||||
*gc_index = cfbGCPrivateIndex;
|
*gc_index = cfbGCPrivateIndex;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cfbWindowPrivateIndex = *window_index;
|
|
||||||
cfbGCPrivateIndex = *gc_index;
|
cfbGCPrivateIndex = *gc_index;
|
||||||
}
|
}
|
||||||
if (!AllocateWindowPrivate(pScreen, cfbWindowPrivateIndex,
|
if (!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC)))
|
||||||
sizeof(cfbPrivWin)) ||
|
|
||||||
!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC)))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#ifdef CFB_NEED_SCREEN_PRIVATE
|
#ifdef CFB_NEED_SCREEN_PRIVATE
|
||||||
if (cfbGeneration != serverGeneration)
|
if (cfbGeneration != serverGeneration)
|
||||||
|
|
|
@ -71,8 +71,6 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#undef cfbDoBitbltGeneral
|
#undef cfbDoBitbltGeneral
|
||||||
#undef cfbDoBitbltOr
|
#undef cfbDoBitbltOr
|
||||||
#undef cfbDoBitbltXor
|
#undef cfbDoBitbltXor
|
||||||
#undef cfbFillBoxSolid
|
|
||||||
#undef cfbFillBoxTile32
|
|
||||||
#undef cfbFillBoxTile32sCopy
|
#undef cfbFillBoxTile32sCopy
|
||||||
#undef cfbFillBoxTile32sGeneral
|
#undef cfbFillBoxTile32sGeneral
|
||||||
#undef cfbFillBoxTileOdd
|
#undef cfbFillBoxTileOdd
|
||||||
|
@ -108,7 +106,6 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#undef cfbNonTEOps
|
#undef cfbNonTEOps
|
||||||
#undef cfbNonTEOps1Rect
|
#undef cfbNonTEOps1Rect
|
||||||
#undef cfbPadPixmap
|
#undef cfbPadPixmap
|
||||||
#undef cfbPaintWindow
|
|
||||||
#undef cfbPolyFillArcSolidCopy
|
#undef cfbPolyFillArcSolidCopy
|
||||||
#undef cfbPolyFillArcSolidGeneral
|
#undef cfbPolyFillArcSolidGeneral
|
||||||
#undef cfbPolyFillRect
|
#undef cfbPolyFillRect
|
||||||
|
@ -250,8 +247,6 @@ cfb can not hack PSZ yet
|
||||||
#define cfbDoBitbltOr CFBNAME(DoBitbltOr)
|
#define cfbDoBitbltOr CFBNAME(DoBitbltOr)
|
||||||
#define cfbDoBitbltXor CFBNAME(DoBitbltXor)
|
#define cfbDoBitbltXor CFBNAME(DoBitbltXor)
|
||||||
#define cfbExpandDirectColors CFBNAME(cfbExpandDirectColors)
|
#define cfbExpandDirectColors CFBNAME(cfbExpandDirectColors)
|
||||||
#define cfbFillBoxSolid CFBNAME(FillBoxSolid)
|
|
||||||
#define cfbFillBoxTile32 CFBNAME(FillBoxTile32)
|
|
||||||
#define cfbFillBoxTile32sCopy CFBNAME(FillBoxTile32sCopy)
|
#define cfbFillBoxTile32sCopy CFBNAME(FillBoxTile32sCopy)
|
||||||
#define cfbFillBoxTile32sGeneral CFBNAME(FillBoxTile32sGeneral)
|
#define cfbFillBoxTile32sGeneral CFBNAME(FillBoxTile32sGeneral)
|
||||||
#define cfbFillBoxTileOdd CFBNAME(FillBoxTileOdd)
|
#define cfbFillBoxTileOdd CFBNAME(FillBoxTileOdd)
|
||||||
|
@ -288,7 +283,6 @@ cfb can not hack PSZ yet
|
||||||
#define cfbNonTEOps CFBNAME(NonTEOps)
|
#define cfbNonTEOps CFBNAME(NonTEOps)
|
||||||
#define cfbNonTEOps1Rect CFBNAME(NonTEOps1Rect)
|
#define cfbNonTEOps1Rect CFBNAME(NonTEOps1Rect)
|
||||||
#define cfbPadPixmap CFBNAME(PadPixmap)
|
#define cfbPadPixmap CFBNAME(PadPixmap)
|
||||||
#define cfbPaintWindow CFBNAME(PaintWindow)
|
|
||||||
#define cfbPolyFillArcSolidCopy CFBNAME(PolyFillArcSolidCopy)
|
#define cfbPolyFillArcSolidCopy CFBNAME(PolyFillArcSolidCopy)
|
||||||
#define cfbPolyFillArcSolidGeneral CFBNAME(PolyFillArcSolidGeneral)
|
#define cfbPolyFillArcSolidGeneral CFBNAME(PolyFillArcSolidGeneral)
|
||||||
#define cfbPolyFillRect CFBNAME(PolyFillRect)
|
#define cfbPolyFillRect CFBNAME(PolyFillRect)
|
||||||
|
|
768
cfb/cfbpntwin.c
768
cfb/cfbpntwin.c
|
@ -1,768 +0,0 @@
|
||||||
/***********************************************************
|
|
||||||
|
|
||||||
Copyright 1987, 1998 The Open Group
|
|
||||||
|
|
||||||
Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
the above copyright notice appear in all copies and that both that
|
|
||||||
copyright notice and this permission notice appear in supporting
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
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
|
|
||||||
OPEN GROUP 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 of The Open Group shall not be
|
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
|
||||||
in this Software without prior written authorization from The Open Group.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
||||||
|
|
||||||
All Rights Reserved
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
|
||||||
documentation for any purpose and without fee is hereby granted,
|
|
||||||
provided that the above copyright notice appear in all copies and that
|
|
||||||
both that copyright notice and this permission notice appear in
|
|
||||||
supporting documentation, and that the name of Digital not be
|
|
||||||
used in advertising or publicity pertaining to distribution of the
|
|
||||||
software without specific, written prior permission.
|
|
||||||
|
|
||||||
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
||||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
||||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
||||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
******************************************************************/
|
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
|
||||||
|
|
||||||
#include "windowstr.h"
|
|
||||||
#include "regionstr.h"
|
|
||||||
#include "pixmapstr.h"
|
|
||||||
#include "scrnintstr.h"
|
|
||||||
|
|
||||||
#include "cfb.h"
|
|
||||||
#include "cfbmskbits.h"
|
|
||||||
#include "mi.h"
|
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
#include "panoramiX.h"
|
|
||||||
#include "panoramiXsrv.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
|
||||||
cfbPaintWindow(pWin, pRegion, what)
|
|
||||||
WindowPtr pWin;
|
|
||||||
RegionPtr pRegion;
|
|
||||||
int what;
|
|
||||||
{
|
|
||||||
register cfbPrivWin *pPrivWin;
|
|
||||||
WindowPtr pBgWin;
|
|
||||||
|
|
||||||
pPrivWin = cfbGetWindowPrivate(pWin);
|
|
||||||
|
|
||||||
|
|
||||||
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:
|
|
||||||
if (pPrivWin->fastBackground)
|
|
||||||
{
|
|
||||||
cfbFillBoxTile32 ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pPrivWin->pRotatedBackground);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int xorg = pWin->drawable.x;
|
|
||||||
int yorg = pWin->drawable.y;
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
if(!noPanoramiXExtension) {
|
|
||||||
int index = pWin->drawable.pScreen->myNum;
|
|
||||||
if(WindowTable[index] == pWin) {
|
|
||||||
xorg -= panoramiXdataPtr[index].x;
|
|
||||||
yorg -= panoramiXdataPtr[index].y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
cfbFillBoxTileOdd ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixmap,
|
|
||||||
xorg, yorg);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
cfbFillBoxSolid ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixel);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
cfbFillBoxSolid ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixel);
|
|
||||||
}
|
|
||||||
else if (pPrivWin->fastBorder)
|
|
||||||
{
|
|
||||||
cfbFillBoxTile32 ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pPrivWin->pRotatedBorder);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int xorg, yorg;
|
|
||||||
|
|
||||||
for (pBgWin = pWin;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
|
|
||||||
xorg = pBgWin->drawable.x;
|
|
||||||
yorg = pBgWin->drawable.y;
|
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
if(!noPanoramiXExtension) {
|
|
||||||
int index = pWin->drawable.pScreen->myNum;
|
|
||||||
if(WindowTable[index] == pBgWin) {
|
|
||||||
xorg -= panoramiXdataPtr[index].x;
|
|
||||||
yorg -= panoramiXdataPtr[index].y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cfbFillBoxTileOdd ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixmap,
|
|
||||||
xorg, yorg);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Use the RROP macros in copy mode
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define RROP GXcopy
|
|
||||||
#include "cfbrrop.h"
|
|
||||||
|
|
||||||
#ifdef RROP_UNROLL
|
|
||||||
# define Expand(left,right,leftAdjust) {\
|
|
||||||
int part = nmiddle & RROP_UNROLL_MASK; \
|
|
||||||
int widthStep; \
|
|
||||||
widthStep = widthDst - nmiddle - leftAdjust; \
|
|
||||||
nmiddle >>= RROP_UNROLL_SHIFT; \
|
|
||||||
while (h--) { \
|
|
||||||
left \
|
|
||||||
pdst += part; \
|
|
||||||
switch (part) { \
|
|
||||||
RROP_UNROLL_CASE(pdst) \
|
|
||||||
} \
|
|
||||||
m = nmiddle; \
|
|
||||||
while (m) { \
|
|
||||||
pdst += RROP_UNROLL; \
|
|
||||||
RROP_UNROLL_LOOP(pdst) \
|
|
||||||
m--; \
|
|
||||||
} \
|
|
||||||
right \
|
|
||||||
pdst += widthStep; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
# define Expand(left, right, leftAdjust) { \
|
|
||||||
int widthStep; \
|
|
||||||
widthStep = widthDst - nmiddle - leftAdjust; \
|
|
||||||
while (h--) { \
|
|
||||||
left \
|
|
||||||
m = nmiddle; \
|
|
||||||
while (m--) {\
|
|
||||||
RROP_SOLID(pdst); \
|
|
||||||
pdst++; \
|
|
||||||
} \
|
|
||||||
right \
|
|
||||||
pdst += widthStep; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
|
||||||
cfbFillBoxSolid (pDrawable, nBox, pBox, pixel)
|
|
||||||
DrawablePtr pDrawable;
|
|
||||||
int nBox;
|
|
||||||
BoxPtr pBox;
|
|
||||||
unsigned long pixel;
|
|
||||||
{
|
|
||||||
CfbBits *pdstBase;
|
|
||||||
int widthDst;
|
|
||||||
register int h;
|
|
||||||
register CfbBits *pdst;
|
|
||||||
int nmiddle;
|
|
||||||
int w;
|
|
||||||
#if PSZ == 24
|
|
||||||
int leftIndex, rightIndex;
|
|
||||||
CfbBits piQxelArray[3], *pdstULC; /*upper left corner*/
|
|
||||||
|
|
||||||
piQxelArray[0] = (pixel&0xFFFFFF) | ((pixel&0xFF)<<24);
|
|
||||||
piQxelArray[1] = ((pixel&0xFFFF00)>>8) | ((pixel&0xFFFF)<<16);
|
|
||||||
piQxelArray[2] = ((pixel&0xFFFFFF)<<8) | ((pixel&0xFF0000)>>16);
|
|
||||||
#else
|
|
||||||
register CfbBits rrop_xor;
|
|
||||||
register CfbBits leftMask, rightMask;
|
|
||||||
register int m;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cfbGetLongWidthAndPointer(pDrawable, widthDst, pdstBase);
|
|
||||||
|
|
||||||
#if PSZ != 24
|
|
||||||
rrop_xor = PFILL(pixel);
|
|
||||||
#endif
|
|
||||||
for (; nBox; nBox--, pBox++)
|
|
||||||
{
|
|
||||||
pdst = pdstBase + pBox->y1 * widthDst;
|
|
||||||
h = pBox->y2 - pBox->y1;
|
|
||||||
w = pBox->x2 - pBox->x1;
|
|
||||||
#if PSZ == 8
|
|
||||||
if (w == 1)
|
|
||||||
{
|
|
||||||
register char *pdstb = ((char *) pdst) + pBox->x1;
|
|
||||||
int incr = widthDst * PGSZB;
|
|
||||||
|
|
||||||
while (h--)
|
|
||||||
{
|
|
||||||
*pdstb = rrop_xor;
|
|
||||||
pdstb += incr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
#if PSZ == 24
|
|
||||||
/* _Box has x1, y1, x2, y2*/
|
|
||||||
leftIndex = pBox->x1 & 3;
|
|
||||||
rightIndex = ((leftIndex+w)<5)?0:(pBox->x2 &3);
|
|
||||||
nmiddle = w - rightIndex;
|
|
||||||
if(leftIndex){
|
|
||||||
nmiddle -= (4 - leftIndex);
|
|
||||||
}
|
|
||||||
nmiddle >>= 2;
|
|
||||||
if(nmiddle < 0)
|
|
||||||
nmiddle = 0;
|
|
||||||
|
|
||||||
pdst = pdstBase + pBox->y1 * widthDst + ((pBox->x1*3) >> 2);
|
|
||||||
|
|
||||||
switch(leftIndex+w){
|
|
||||||
case 4:
|
|
||||||
switch(leftIndex){
|
|
||||||
case 0:
|
|
||||||
while(h--){
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = piQxelArray[2];
|
|
||||||
pdst -=2;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
while(h--){
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000);
|
|
||||||
pdst++;
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = piQxelArray[2];
|
|
||||||
pdst -=2;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
while(h--){
|
|
||||||
*pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000);
|
|
||||||
pdst++;
|
|
||||||
*pdst-- = piQxelArray[2];
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
while(h--){
|
|
||||||
*pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00);
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
switch(leftIndex){
|
|
||||||
case 0:
|
|
||||||
while(h--){
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF);
|
|
||||||
pdst--;
|
|
||||||
pdst--;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
while(h--){
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000);
|
|
||||||
pdst++;
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF);
|
|
||||||
pdst--;
|
|
||||||
pdst--;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
while(h--){
|
|
||||||
*pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000);
|
|
||||||
pdst++;
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF);
|
|
||||||
pdst--;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
while(h--){
|
|
||||||
if(leftIndex){
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000);
|
|
||||||
pdst++;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
}
|
|
||||||
*pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF);
|
|
||||||
pdst--;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1: /*only if leftIndex = 0 and w = 1*/
|
|
||||||
while(h--){
|
|
||||||
*pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF);
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 0: /*never*/
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
w = nmiddle;
|
|
||||||
pdstULC = pdst;
|
|
||||||
/* maskbits (pBox->x1, w, leftMask, rightMask, nmiddle);*/
|
|
||||||
while(h--){
|
|
||||||
nmiddle = w;
|
|
||||||
pdst = pdstULC;
|
|
||||||
switch(leftIndex){
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000);
|
|
||||||
pdst++;
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst++ = piQxelArray[2];
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
*pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000);
|
|
||||||
pdst++;
|
|
||||||
*pdst++ = piQxelArray[2];
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
*pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00);
|
|
||||||
pdst++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
while(nmiddle--){
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst++ = piQxelArray[2];
|
|
||||||
}
|
|
||||||
switch(rightIndex){
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
*pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
pdstULC += widthDst;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
pdst += (pBox->x1 >> PWSH);
|
|
||||||
if ((pBox->x1 & PIM) + w <= PPW)
|
|
||||||
{
|
|
||||||
maskpartialbits(pBox->x1, w, leftMask);
|
|
||||||
while (h--) {
|
|
||||||
*pdst = (*pdst & ~leftMask) | (rrop_xor & leftMask);
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
maskbits (pBox->x1, w, leftMask, rightMask, nmiddle);
|
|
||||||
if (leftMask)
|
|
||||||
{
|
|
||||||
if (rightMask)
|
|
||||||
{
|
|
||||||
Expand (RROP_SOLID_MASK (pdst, leftMask); pdst++; ,
|
|
||||||
RROP_SOLID_MASK (pdst, rightMask); ,
|
|
||||||
1)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Expand (RROP_SOLID_MASK (pdst, leftMask); pdst++;,
|
|
||||||
;,
|
|
||||||
1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (rightMask)
|
|
||||||
{
|
|
||||||
Expand (;,
|
|
||||||
RROP_SOLID_MASK (pdst, rightMask);,
|
|
||||||
0)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Expand (;,
|
|
||||||
;,
|
|
||||||
0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if PSZ == 8
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
cfbFillBoxTile32 (pDrawable, nBox, pBox, tile)
|
|
||||||
DrawablePtr pDrawable;
|
|
||||||
int nBox; /* number of boxes to fill */
|
|
||||||
BoxPtr pBox; /* pointer to list of boxes to fill */
|
|
||||||
PixmapPtr tile; /* rotated, expanded tile */
|
|
||||||
{
|
|
||||||
register CfbBits *pdst;
|
|
||||||
CfbBits *psrc;
|
|
||||||
int tileHeight;
|
|
||||||
|
|
||||||
int widthDst;
|
|
||||||
int w;
|
|
||||||
int h;
|
|
||||||
int nmiddle;
|
|
||||||
int y;
|
|
||||||
int srcy;
|
|
||||||
|
|
||||||
CfbBits *pdstBase;
|
|
||||||
#if PSZ == 24
|
|
||||||
int leftIndex, rightIndex;
|
|
||||||
CfbBits piQxelArray[3], *pdstULC;
|
|
||||||
#else
|
|
||||||
register CfbBits rrop_xor;
|
|
||||||
register CfbBits leftMask;
|
|
||||||
register CfbBits rightMask;
|
|
||||||
register int m;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tileHeight = tile->drawable.height;
|
|
||||||
psrc = (CfbBits *)tile->devPrivate.ptr;
|
|
||||||
|
|
||||||
cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase);
|
|
||||||
|
|
||||||
while (nBox--)
|
|
||||||
{
|
|
||||||
#if PSZ == 24
|
|
||||||
w = pBox->x2 - pBox->x1;
|
|
||||||
h = pBox->y2 - pBox->y1;
|
|
||||||
y = pBox->y1;
|
|
||||||
leftIndex = pBox->x1 & 3;
|
|
||||||
/* rightIndex = ((leftIndex+w)<5)?0:pBox->x2 &3;*/
|
|
||||||
rightIndex = pBox->x2 &3;
|
|
||||||
nmiddle = w - rightIndex;
|
|
||||||
if(leftIndex){
|
|
||||||
nmiddle -= (4 - leftIndex);
|
|
||||||
}
|
|
||||||
nmiddle >>= 2;
|
|
||||||
if(nmiddle < 0)
|
|
||||||
nmiddle = 0;
|
|
||||||
|
|
||||||
pdst = pdstBase + ((pBox->x1 *3)>> 2) + pBox->y1 * widthDst;
|
|
||||||
srcy = y % tileHeight;
|
|
||||||
|
|
||||||
#define StepTile piQxelArray[0] = (psrc[srcy] & 0xFFFFFF) | ((psrc[srcy] & 0xFF)<<24); \
|
|
||||||
piQxelArray[1] = (psrc[srcy] & 0xFFFF00) | ((psrc[srcy] & 0xFFFF)<<16); \
|
|
||||||
piQxelArray[2] = ((psrc[srcy] & 0xFF0000)>>16) | \
|
|
||||||
((psrc[srcy] & 0xFFFFFF)<<8); \
|
|
||||||
/*rrop_xor = psrc[srcy];*/ \
|
|
||||||
++srcy; \
|
|
||||||
if (srcy == tileHeight) \
|
|
||||||
srcy = 0;
|
|
||||||
|
|
||||||
switch(leftIndex+w){
|
|
||||||
case 4:
|
|
||||||
switch(leftIndex){
|
|
||||||
case 0:
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = piQxelArray[2];
|
|
||||||
pdst-=2;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000);
|
|
||||||
pdst++;
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = piQxelArray[2];
|
|
||||||
pdst-=2;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
*pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000);
|
|
||||||
pdst++;
|
|
||||||
*pdst-- = piQxelArray[2];
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
*pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00);
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
switch(leftIndex){
|
|
||||||
case 0:
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF);
|
|
||||||
pdst--;
|
|
||||||
pdst--;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000);
|
|
||||||
pdst++;
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF);
|
|
||||||
pdst--;
|
|
||||||
pdst--;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
*pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000);
|
|
||||||
pdst++;
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF);
|
|
||||||
pdst--;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
if(leftIndex){
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000);
|
|
||||||
pdst++;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
}
|
|
||||||
*pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF);
|
|
||||||
pdst--;
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1: /*only if leftIndex = 0 and w = 1*/
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
*pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF);
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 0: /*never*/
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
w = nmiddle;
|
|
||||||
pdstULC = pdst;
|
|
||||||
|
|
||||||
while(h--){
|
|
||||||
StepTile
|
|
||||||
nmiddle = w;
|
|
||||||
pdst = pdstULC;
|
|
||||||
switch(leftIndex){
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000);
|
|
||||||
pdst++;
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst++ = piQxelArray[2];
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
*pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000);
|
|
||||||
pdst++;
|
|
||||||
*pdst++ = piQxelArray[2];
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
*pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00);
|
|
||||||
pdst++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
while(nmiddle--){
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst++ = piQxelArray[2];
|
|
||||||
}
|
|
||||||
switch(rightIndex){
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
*pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
*pdst++ = piQxelArray[0];
|
|
||||||
*pdst++ = piQxelArray[1];
|
|
||||||
*pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
pdstULC += widthDst;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
w = pBox->x2 - pBox->x1;
|
|
||||||
h = pBox->y2 - pBox->y1;
|
|
||||||
y = pBox->y1;
|
|
||||||
pdst = pdstBase + (pBox->y1 * widthDst) + (pBox->x1 >> PWSH);
|
|
||||||
srcy = y % tileHeight;
|
|
||||||
|
|
||||||
#define StepTile rrop_xor = psrc[srcy]; \
|
|
||||||
++srcy; \
|
|
||||||
if (srcy == tileHeight) \
|
|
||||||
srcy = 0;
|
|
||||||
|
|
||||||
if ( ((pBox->x1 & PIM) + w) < PPW)
|
|
||||||
{
|
|
||||||
maskpartialbits(pBox->x1, w, leftMask);
|
|
||||||
rightMask = ~leftMask;
|
|
||||||
while (h--)
|
|
||||||
{
|
|
||||||
StepTile
|
|
||||||
*pdst = (*pdst & rightMask) | (rrop_xor & leftMask);
|
|
||||||
pdst += widthDst;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
maskbits(pBox->x1, w, leftMask, rightMask, nmiddle);
|
|
||||||
|
|
||||||
if (leftMask)
|
|
||||||
{
|
|
||||||
if (rightMask)
|
|
||||||
{
|
|
||||||
Expand (StepTile
|
|
||||||
RROP_SOLID_MASK(pdst, leftMask); pdst++;,
|
|
||||||
RROP_SOLID_MASK(pdst, rightMask);,
|
|
||||||
1)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Expand (StepTile
|
|
||||||
RROP_SOLID_MASK(pdst, leftMask); pdst++;,
|
|
||||||
;,
|
|
||||||
1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (rightMask)
|
|
||||||
{
|
|
||||||
Expand (StepTile
|
|
||||||
,
|
|
||||||
RROP_SOLID_MASK(pdst, rightMask);,
|
|
||||||
0)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Expand (StepTile
|
|
||||||
,
|
|
||||||
;,
|
|
||||||
0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
pBox++;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -88,7 +88,7 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
||||||
int dpix, dpiy; /* dots per inch */
|
int dpix, dpiy; /* dots per inch */
|
||||||
int width; /* pixel width of frame buffer */
|
int width; /* pixel width of frame buffer */
|
||||||
{
|
{
|
||||||
if (!cfbAllocatePrivates(pScreen, (int *) 0, (int *) 0))
|
if (!cfbAllocatePrivates(pScreen, NULL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
pScreen->defColormap = FakeClientID(0);
|
pScreen->defColormap = FakeClientID(0);
|
||||||
/* let CreateDefColormap do whatever it wants for pixels */
|
/* let CreateDefColormap do whatever it wants for pixels */
|
||||||
|
@ -103,8 +103,6 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
||||||
pScreen->ChangeWindowAttributes = cfbChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = cfbChangeWindowAttributes;
|
||||||
pScreen->RealizeWindow = cfbMapWindow;
|
pScreen->RealizeWindow = cfbMapWindow;
|
||||||
pScreen->UnrealizeWindow = cfbUnmapWindow;
|
pScreen->UnrealizeWindow = cfbUnmapWindow;
|
||||||
pScreen->PaintWindowBackground = cfbPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = cfbPaintWindow;
|
|
||||||
pScreen->CopyWindow = cfbCopyWindow;
|
pScreen->CopyWindow = cfbCopyWindow;
|
||||||
pScreen->CreatePixmap = cfbCreatePixmap;
|
pScreen->CreatePixmap = cfbCreatePixmap;
|
||||||
pScreen->DestroyPixmap = cfbDestroyPixmap;
|
pScreen->DestroyPixmap = cfbDestroyPixmap;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Fill 32 bit tiled rectangles. Used by both PolyFillRect and PaintWindow.
|
* Fill 32 bit tiled rectangles. Used by PolyFillRect.
|
||||||
* no depth dependencies.
|
* no depth dependencies.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -74,8 +74,6 @@
|
||||||
#undef cfbDoBitbltOr
|
#undef cfbDoBitbltOr
|
||||||
#undef cfbDoBitbltXor
|
#undef cfbDoBitbltXor
|
||||||
#undef cfbExpandDirectColors
|
#undef cfbExpandDirectColors
|
||||||
#undef cfbFillBoxSolid
|
|
||||||
#undef cfbFillBoxTile32
|
|
||||||
#undef cfbFillBoxTile32sCopy
|
#undef cfbFillBoxTile32sCopy
|
||||||
#undef cfbFillBoxTile32sGeneral
|
#undef cfbFillBoxTile32sGeneral
|
||||||
#undef cfbFillBoxTileOdd
|
#undef cfbFillBoxTileOdd
|
||||||
|
@ -112,7 +110,6 @@
|
||||||
#undef cfbNonTEOps
|
#undef cfbNonTEOps
|
||||||
#undef cfbNonTEOps1Rect
|
#undef cfbNonTEOps1Rect
|
||||||
#undef cfbPadPixmap
|
#undef cfbPadPixmap
|
||||||
#undef cfbPaintWindow
|
|
||||||
#undef cfbPolyFillArcSolidCopy
|
#undef cfbPolyFillArcSolidCopy
|
||||||
#undef cfbPolyFillArcSolidGeneral
|
#undef cfbPolyFillArcSolidGeneral
|
||||||
#undef cfbPolyFillRect
|
#undef cfbPolyFillRect
|
||||||
|
|
185
cfb/cfbwindow.c
185
cfb/cfbwindow.c
|
@ -60,19 +60,8 @@ SOFTWARE.
|
||||||
#include "cfbmskbits.h"
|
#include "cfbmskbits.h"
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
cfbCreateWindow(pWin)
|
cfbCreateWindow(WindowPtr pWin)
|
||||||
WindowPtr pWin;
|
|
||||||
{
|
{
|
||||||
cfbPrivWin *pPrivWin;
|
|
||||||
|
|
||||||
pPrivWin = cfbGetWindowPrivate(pWin);
|
|
||||||
pPrivWin->pRotatedBorder = NullPixmap;
|
|
||||||
pPrivWin->pRotatedBackground = NullPixmap;
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
pPrivWin->oldRotate.x = 0;
|
|
||||||
pPrivWin->oldRotate.y = 0;
|
|
||||||
|
|
||||||
#ifdef PIXMAP_PER_WINDOW
|
#ifdef PIXMAP_PER_WINDOW
|
||||||
/* Setup pointer to Screen pixmap */
|
/* Setup pointer to Screen pixmap */
|
||||||
pWin->devPrivates[frameWindowPrivateIndex].ptr =
|
pWin->devPrivates[frameWindowPrivateIndex].ptr =
|
||||||
|
@ -83,17 +72,8 @@ cfbCreateWindow(pWin)
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
cfbDestroyWindow(pWin)
|
cfbDestroyWindow(WindowPtr pWin)
|
||||||
WindowPtr pWin;
|
|
||||||
{
|
{
|
||||||
cfbPrivWin *pPrivWin;
|
|
||||||
|
|
||||||
pPrivWin = cfbGetWindowPrivate(pWin);
|
|
||||||
|
|
||||||
if (pPrivWin->pRotatedBorder)
|
|
||||||
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder);
|
|
||||||
if (pPrivWin->pRotatedBackground)
|
|
||||||
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground);
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,47 +85,10 @@ cfbMapWindow(pWindow)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (x, y) is the upper left corner of the window on the screen
|
|
||||||
do we really need to pass this? (is it a;ready in pWin->absCorner?)
|
|
||||||
we only do the rotation for pixmaps that are 32 bits wide (padded
|
|
||||||
or otherwise.)
|
|
||||||
cfbChangeWindowAttributes() has already put a copy of the pixmap
|
|
||||||
in pPrivWin->pRotated*
|
|
||||||
*/
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
Bool
|
Bool
|
||||||
cfbPositionWindow(pWin, x, y)
|
cfbPositionWindow(WindowPtr pWin, int x, int y)
|
||||||
WindowPtr pWin;
|
|
||||||
int x, y;
|
|
||||||
{
|
{
|
||||||
cfbPrivWin *pPrivWin;
|
|
||||||
int setxy = 0;
|
|
||||||
|
|
||||||
pPrivWin = cfbGetWindowPrivate(pWin);
|
|
||||||
if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground)
|
|
||||||
{
|
|
||||||
cfbXRotatePixmap(pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
cfbYRotatePixmap(pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
setxy = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pWin->borderIsPixel && pPrivWin->fastBorder)
|
|
||||||
{
|
|
||||||
while (pWin->backgroundState == ParentRelative)
|
|
||||||
pWin = pWin->parent;
|
|
||||||
cfbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
cfbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
setxy = 1;
|
|
||||||
}
|
|
||||||
if (setxy)
|
|
||||||
{
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
}
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,129 +152,9 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc)
|
||||||
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
|
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* swap in correct PaintWindow* routine. If we can use a fast output
|
|
||||||
routine (i.e. the pixmap is paddable to 32 bits), also pre-rotate a copy
|
|
||||||
of it in devPrivates[cfbWindowPrivateIndex].ptr.
|
|
||||||
*/
|
|
||||||
Bool
|
Bool
|
||||||
cfbChangeWindowAttributes(pWin, mask)
|
cfbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
||||||
WindowPtr pWin;
|
|
||||||
unsigned long mask;
|
|
||||||
{
|
{
|
||||||
register unsigned long index;
|
|
||||||
register cfbPrivWin *pPrivWin;
|
|
||||||
int width;
|
|
||||||
WindowPtr pBgWin;
|
|
||||||
|
|
||||||
pPrivWin = cfbGetWindowPrivate(pWin);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* When background state changes from ParentRelative and
|
|
||||||
* we had previously rotated the fast border pixmap to match
|
|
||||||
* the parent relative origin, rerotate to match window
|
|
||||||
*/
|
|
||||||
if (mask & (CWBackPixmap | CWBackPixel) &&
|
|
||||||
pWin->backgroundState != ParentRelative &&
|
|
||||||
pPrivWin->fastBorder &&
|
|
||||||
(pPrivWin->oldRotate.x != pWin->drawable.x ||
|
|
||||||
pPrivWin->oldRotate.y != pWin->drawable.y))
|
|
||||||
{
|
|
||||||
cfbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
cfbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
}
|
|
||||||
while(mask)
|
|
||||||
{
|
|
||||||
index = lowbit (mask);
|
|
||||||
mask &= ~index;
|
|
||||||
switch(index)
|
|
||||||
{
|
|
||||||
case CWBackPixmap:
|
|
||||||
if (pWin->backgroundState == None)
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
}
|
|
||||||
else if (pWin->backgroundState == ParentRelative)
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
/* Rotate border to match parent origin */
|
|
||||||
if (pPrivWin->pRotatedBorder) {
|
|
||||||
for (pBgWin = pWin->parent;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
cfbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
cfbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
pPrivWin->oldRotate.x = pBgWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pBgWin->drawable.y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (((width = (pWin->background.pixmap->drawable.width * PSZ))
|
|
||||||
<= PGSZ) && !(width & (width - 1)))
|
|
||||||
{
|
|
||||||
cfbCopyRotatePixmap(pWin->background.pixmap,
|
|
||||||
&pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.x,
|
|
||||||
pWin->drawable.y);
|
|
||||||
if (pPrivWin->pRotatedBackground)
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = TRUE;
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CWBackPixel:
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CWBorderPixmap:
|
|
||||||
if (((width = (pWin->border.pixmap->drawable.width * PSZ)) <= PGSZ) &&
|
|
||||||
!(width & (width - 1)))
|
|
||||||
{
|
|
||||||
for (pBgWin = pWin;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
cfbCopyRotatePixmap(pWin->border.pixmap,
|
|
||||||
&pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.x,
|
|
||||||
pBgWin->drawable.y);
|
|
||||||
if (pPrivWin->pRotatedBorder)
|
|
||||||
{
|
|
||||||
pPrivWin->fastBorder = TRUE;
|
|
||||||
pPrivWin->oldRotate.x = pBgWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pBgWin->drawable.y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CWBorderPixel:
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,6 @@ compCloseScreen (int index, ScreenPtr pScreen)
|
||||||
pScreen->ChangeBorderWidth = cs->ChangeBorderWidth;
|
pScreen->ChangeBorderWidth = cs->ChangeBorderWidth;
|
||||||
|
|
||||||
pScreen->ClipNotify = cs->ClipNotify;
|
pScreen->ClipNotify = cs->ClipNotify;
|
||||||
pScreen->PaintWindowBackground = cs->PaintWindowBackground;
|
|
||||||
pScreen->UnrealizeWindow = cs->UnrealizeWindow;
|
pScreen->UnrealizeWindow = cs->UnrealizeWindow;
|
||||||
pScreen->RealizeWindow = cs->RealizeWindow;
|
pScreen->RealizeWindow = cs->RealizeWindow;
|
||||||
pScreen->DestroyWindow = cs->DestroyWindow;
|
pScreen->DestroyWindow = cs->DestroyWindow;
|
||||||
|
@ -431,9 +430,6 @@ compScreenInit (ScreenPtr pScreen)
|
||||||
cs->UnrealizeWindow = pScreen->UnrealizeWindow;
|
cs->UnrealizeWindow = pScreen->UnrealizeWindow;
|
||||||
pScreen->UnrealizeWindow = compUnrealizeWindow;
|
pScreen->UnrealizeWindow = compUnrealizeWindow;
|
||||||
|
|
||||||
cs->PaintWindowBackground = pScreen->PaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBackground = compPaintWindowBackground;
|
|
||||||
|
|
||||||
cs->ClipNotify = pScreen->ClipNotify;
|
cs->ClipNotify = pScreen->ClipNotify;
|
||||||
pScreen->ClipNotify = compClipNotify;
|
pScreen->ClipNotify = compClipNotify;
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,6 @@ typedef struct _CompScreen {
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
DestroyWindowProcPtr DestroyWindow;
|
||||||
RealizeWindowProcPtr RealizeWindow;
|
RealizeWindowProcPtr RealizeWindow;
|
||||||
UnrealizeWindowProcPtr UnrealizeWindow;
|
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||||
PaintWindowProcPtr PaintWindowBackground;
|
|
||||||
ClipNotifyProcPtr ClipNotify;
|
ClipNotifyProcPtr ClipNotify;
|
||||||
/*
|
/*
|
||||||
* Called from ConfigureWindow, these
|
* Called from ConfigureWindow, these
|
||||||
|
@ -255,9 +254,6 @@ compRealizeWindow (WindowPtr pWin);
|
||||||
Bool
|
Bool
|
||||||
compUnrealizeWindow (WindowPtr pWin);
|
compUnrealizeWindow (WindowPtr pWin);
|
||||||
|
|
||||||
void
|
|
||||||
compPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
compClipNotify (WindowPtr pWin, int dx, int dy);
|
compClipNotify (WindowPtr pWin, int dx, int dy);
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ compRepaintBorder (ClientPtr pClient, pointer closure)
|
||||||
|
|
||||||
REGION_NULL(pScreen, &exposed);
|
REGION_NULL(pScreen, &exposed);
|
||||||
REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize);
|
REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize);
|
||||||
(*pWindow->drawable.pScreen->PaintWindowBorder)(pWindow, &exposed, PW_BORDER);
|
miPaintWindow(pWindow, &exposed, PW_BORDER);
|
||||||
REGION_UNINIT(pScreen, &exposed);
|
REGION_UNINIT(pScreen, &exposed);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -240,21 +240,6 @@ compUnrealizeWindow (WindowPtr pWin)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
compPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
CompSubwindowsPtr csw = GetCompSubwindows (pWin);
|
|
||||||
CompScreenPtr cs = GetCompScreen (pScreen);
|
|
||||||
|
|
||||||
if (csw && csw->update == CompositeRedirectManual)
|
|
||||||
return;
|
|
||||||
pScreen->PaintWindowBackground = cs->PaintWindowBackground;
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, pRegion, what);
|
|
||||||
cs->PaintWindowBackground = pScreen->PaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBackground = compPaintWindowBackground;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called after the borderClip for the window has settled down
|
* Called after the borderClip for the window has settled down
|
||||||
* We use this to make sure our extra borderClip has the right origin
|
* We use this to make sure our extra borderClip has the right origin
|
||||||
|
|
|
@ -1522,7 +1522,7 @@ PatchUp:
|
||||||
|
|
||||||
REGION_NULL(pScreen, &exposed);
|
REGION_NULL(pScreen, &exposed);
|
||||||
REGION_SUBTRACT(pScreen, &exposed, &pWin->borderClip, &pWin->winSize);
|
REGION_SUBTRACT(pScreen, &exposed, &pWin->borderClip, &pWin->winSize);
|
||||||
(*pWin->drawable.pScreen->PaintWindowBorder)(pWin, &exposed, PW_BORDER);
|
miPaintWindow(pWin, &exposed, PW_BORDER);
|
||||||
REGION_UNINIT(pScreen, &exposed);
|
REGION_UNINIT(pScreen, &exposed);
|
||||||
}
|
}
|
||||||
return error;
|
return error;
|
||||||
|
|
|
@ -604,8 +604,6 @@ exaCloseScreen(int i, ScreenPtr pScreen)
|
||||||
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
||||||
pScreen->GetImage = pExaScr->SavedGetImage;
|
pScreen->GetImage = pExaScr->SavedGetImage;
|
||||||
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
||||||
pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder;
|
|
||||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||||
|
@ -759,12 +757,6 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
pExaScr->SavedBitmapToRegion = pScreen->BitmapToRegion;
|
pExaScr->SavedBitmapToRegion = pScreen->BitmapToRegion;
|
||||||
pScreen->BitmapToRegion = exaBitmapToRegion;
|
pScreen->BitmapToRegion = exaBitmapToRegion;
|
||||||
|
|
||||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
|
||||||
|
|
||||||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
|
||||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
|
||||||
|
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
if (ps) {
|
if (ps) {
|
||||||
pExaScr->SavedComposite = ps->Composite;
|
pExaScr->SavedComposite = ps->Composite;
|
||||||
|
|
|
@ -1304,54 +1304,6 @@ fallback:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
ExaScreenPriv (pWin->drawable.pScreen);
|
|
||||||
|
|
||||||
if (REGION_NIL(pRegion))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!pExaScr->swappedOut) {
|
|
||||||
DDXPointRec zeros = { 0, 0 };
|
|
||||||
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixel:
|
|
||||||
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel,
|
|
||||||
FB_ALLONES, GXcopy);
|
|
||||||
return;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap,
|
|
||||||
&zeros, FB_ALLONES, GXcopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel) {
|
|
||||||
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel,
|
|
||||||
FB_ALLONES, GXcopy);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap,
|
|
||||||
&zeros, FB_ALLONES, GXcopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ExaCheckPaintWindow (pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accelerates GetImage for solid ZPixmap downloads from framebuffer memory.
|
* Accelerates GetImage for solid ZPixmap downloads from framebuffer memory.
|
||||||
|
|
|
@ -101,10 +101,8 @@ typedef struct {
|
||||||
CloseScreenProcPtr SavedCloseScreen;
|
CloseScreenProcPtr SavedCloseScreen;
|
||||||
GetImageProcPtr SavedGetImage;
|
GetImageProcPtr SavedGetImage;
|
||||||
GetSpansProcPtr SavedGetSpans;
|
GetSpansProcPtr SavedGetSpans;
|
||||||
PaintWindowBackgroundProcPtr SavedPaintWindowBackground;
|
|
||||||
CreatePixmapProcPtr SavedCreatePixmap;
|
CreatePixmapProcPtr SavedCreatePixmap;
|
||||||
DestroyPixmapProcPtr SavedDestroyPixmap;
|
DestroyPixmapProcPtr SavedDestroyPixmap;
|
||||||
PaintWindowBorderProcPtr SavedPaintWindowBorder;
|
|
||||||
CopyWindowProcPtr SavedCopyWindow;
|
CopyWindowProcPtr SavedCopyWindow;
|
||||||
ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
|
ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
|
||||||
BitmapToRegionProcPtr SavedBitmapToRegion;
|
BitmapToRegionProcPtr SavedBitmapToRegion;
|
||||||
|
@ -272,9 +270,6 @@ ExaCheckGetSpans (DrawablePtr pDrawable,
|
||||||
int nspans,
|
int nspans,
|
||||||
char *pdstStart);
|
char *pdstStart);
|
||||||
|
|
||||||
void
|
|
||||||
ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
|
|
||||||
CARD32
|
CARD32
|
||||||
exaGetPixmapFirstPixel (PixmapPtr pPixmap);
|
exaGetPixmapFirstPixel (PixmapPtr pPixmap);
|
||||||
|
|
||||||
|
@ -296,9 +291,6 @@ Bool
|
||||||
exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
|
exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
|
||||||
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu);
|
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu);
|
||||||
|
|
||||||
void
|
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
exaShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int format,
|
exaShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int format,
|
||||||
int w, int h, int sx, int sy, int sw, int sh, int dx, int dy,
|
int w, int h, int sx, int sy, int sw, int sh, int dx, int dy,
|
||||||
|
|
|
@ -278,23 +278,6 @@ ExaCheckGetSpans (DrawablePtr pDrawable,
|
||||||
exaFinishAccess (pDrawable, EXA_PREPARE_SRC);
|
exaFinishAccess (pDrawable, EXA_PREPARE_SRC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: Note the lack of a prepare on the tile, if the window has a tiled
|
|
||||||
* background. This function happens to only be called if pExaScr->swappedOut,
|
|
||||||
* so we actually end up not having to do it since the tile won't be in fb.
|
|
||||||
* That doesn't make this not dirty, though.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
EXA_FALLBACK(("from %p (%c)\n", pWin,
|
|
||||||
exaDrawableLocation(&pWin->drawable)));
|
|
||||||
exaPrepareAccess (&pWin->drawable, EXA_PREPARE_DEST);
|
|
||||||
exaPrepareAccessWindow(pWin);
|
|
||||||
fbPaintWindow (pWin, pRegion, what);
|
|
||||||
exaFinishAccessWindow(pWin);
|
|
||||||
exaFinishAccess (&pWin->drawable, EXA_PREPARE_DEST);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ExaCheckComposite (CARD8 op,
|
ExaCheckComposite (CARD8 op,
|
||||||
PicturePtr pSrc,
|
PicturePtr pSrc,
|
||||||
|
|
4
fb/fb.h
4
fb/fb.h
|
@ -2094,10 +2094,6 @@ fbFillRegionTiled (DrawablePtr pDrawable,
|
||||||
RegionPtr pRegion,
|
RegionPtr pRegion,
|
||||||
PixmapPtr pTile);
|
PixmapPtr pTile);
|
||||||
|
|
||||||
void
|
|
||||||
fbPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
|
|
||||||
|
|
||||||
pixman_image_t *image_from_pict (PicturePtr pict,
|
pixman_image_t *image_from_pict (PicturePtr pict,
|
||||||
Bool has_clip);
|
Bool has_clip);
|
||||||
void free_pixman_pict (PicturePtr, pixman_image_t *);
|
void free_pixman_pict (PicturePtr, pixman_image_t *);
|
||||||
|
|
|
@ -278,16 +278,6 @@ fbOverlayWindowExposures (WindowPtr pWin,
|
||||||
miWindowExposures(pWin, prgn, other_exposed);
|
miWindowExposures(pWin, prgn, other_exposed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
fbOverlayPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
if (what == PW_BORDER)
|
|
||||||
fbOverlayUpdateLayerRegion (pWin->drawable.pScreen,
|
|
||||||
fbOverlayWindowLayer (pWin),
|
|
||||||
pRegion);
|
|
||||||
fbPaintWindow (pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
fbOverlaySetupScreen(ScreenPtr pScreen,
|
fbOverlaySetupScreen(ScreenPtr pScreen,
|
||||||
pointer pbits1,
|
pointer pbits1,
|
||||||
|
@ -441,7 +431,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
||||||
pScreen->CreateWindow = fbOverlayCreateWindow;
|
pScreen->CreateWindow = fbOverlayCreateWindow;
|
||||||
pScreen->WindowExposures = fbOverlayWindowExposures;
|
pScreen->WindowExposures = fbOverlayWindowExposures;
|
||||||
pScreen->CopyWindow = fbOverlayCopyWindow;
|
pScreen->CopyWindow = fbOverlayCopyWindow;
|
||||||
pScreen->PaintWindowBorder = fbOverlayPaintWindow;
|
|
||||||
#ifdef FB_24_32BIT
|
#ifdef FB_24_32BIT
|
||||||
if (bpp == 24 && imagebpp == 32)
|
if (bpp == 24 && imagebpp == 32)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,10 +93,6 @@ fbOverlayWindowExposures (WindowPtr pWin,
|
||||||
RegionPtr prgn,
|
RegionPtr prgn,
|
||||||
RegionPtr other_exposed);
|
RegionPtr other_exposed);
|
||||||
|
|
||||||
void
|
|
||||||
fbOverlayPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
fbOverlaySetupScreen(ScreenPtr pScreen,
|
fbOverlaySetupScreen(ScreenPtr pScreen,
|
||||||
pointer pbits1,
|
pointer pbits1,
|
||||||
|
|
|
@ -94,8 +94,6 @@ typedef struct {
|
||||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||||
CreateWindowProcPtr CreateWindow;
|
CreateWindowProcPtr CreateWindow;
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
PaintWindowProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowProcPtr PaintWindowBorder;
|
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
CreateGCProcPtr CreateGC;
|
CreateGCProcPtr CreateGC;
|
||||||
CreateColormapProcPtr CreateColormap;
|
CreateColormapProcPtr CreateColormap;
|
||||||
|
@ -794,70 +792,6 @@ xxWindowExposures (WindowPtr pWin,
|
||||||
wrap(pScrPriv, pWin->drawable.pScreen, WindowExposures, xxWindowExposures);
|
wrap(pScrPriv, pWin->drawable.pScreen, WindowExposures, xxWindowExposures);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
xxPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
xxScrPriv(pWin->drawable.pScreen);
|
|
||||||
RegionRec rgni;
|
|
||||||
|
|
||||||
DBG("xxPaintWindow\n");
|
|
||||||
|
|
||||||
REGION_NULL (pWin->drawable.pScreen, &rgni);
|
|
||||||
#if 0
|
|
||||||
REGION_UNION (pWin->drawable.pScreen, &rgni, &rgni, &pWin->borderClip);
|
|
||||||
REGION_INTERSECT(pWin->drawable.pScreen, &rgni, &rgni, pRegion);
|
|
||||||
#else
|
|
||||||
REGION_UNION (pWin->drawable.pScreen, &rgni, &rgni, pRegion);
|
|
||||||
#endif
|
|
||||||
switch (what) {
|
|
||||||
case PW_BORDER:
|
|
||||||
REGION_SUBTRACT (pWin->drawable.pScreen, &rgni, &rgni, &pWin->winSize);
|
|
||||||
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
|
|
||||||
DBG("PaintWindowBorder\n");
|
|
||||||
REGION_UNION (pWin->drawable.pScreen, &pScrPriv->region,
|
|
||||||
&pScrPriv->region, &rgni);
|
|
||||||
} else {
|
|
||||||
DBG("PaintWindowBorder NoOverlay\n");
|
|
||||||
REGION_SUBTRACT (pWin->drawable.pScreen, &pScrPriv->region,
|
|
||||||
&pScrPriv->region, &rgni);
|
|
||||||
}
|
|
||||||
unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBorder);
|
|
||||||
pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what);
|
|
||||||
wrap(pScrPriv, pWin->drawable.pScreen, PaintWindowBorder,
|
|
||||||
xxPaintWindow);
|
|
||||||
break;
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
REGION_INTERSECT (pWin->drawable.pScreen, &rgni,
|
|
||||||
&rgni,&pWin->winSize);
|
|
||||||
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
|
|
||||||
DBG("PaintWindowBackground\n");
|
|
||||||
REGION_UNION (pWin->drawable.pScreen, &pScrPriv->region,
|
|
||||||
&pScrPriv->region, &rgni);
|
|
||||||
} else {
|
|
||||||
DBG("PaintWindowBackground NoOverlay\n");
|
|
||||||
REGION_SUBTRACT (pWin->drawable.pScreen, &pScrPriv->region,
|
|
||||||
&pScrPriv->region, &rgni);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBackground);
|
|
||||||
pWin->drawable.pScreen->PaintWindowBackground (pWin, pRegion, what);
|
|
||||||
wrap(pScrPriv, pWin->drawable.pScreen, PaintWindowBackground,
|
|
||||||
xxPaintWindow);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
PRINT_RECTS(rgni);
|
|
||||||
PRINT_RECTS(pScrPriv->region);
|
|
||||||
#if 1
|
|
||||||
REGION_UNINIT(pWin->drawable.pScreen,&rgni);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
|
xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
|
||||||
xxCmapPrivPtr pCmapPriv)
|
xxCmapPrivPtr pCmapPriv)
|
||||||
|
@ -1171,8 +1105,6 @@ xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sy
|
||||||
wrap (pScrPriv, pScreen, CreateScreenResources, xxCreateScreenResources);
|
wrap (pScrPriv, pScreen, CreateScreenResources, xxCreateScreenResources);
|
||||||
wrap (pScrPriv, pScreen, CreateWindow, xxCreateWindow);
|
wrap (pScrPriv, pScreen, CreateWindow, xxCreateWindow);
|
||||||
wrap (pScrPriv, pScreen, CopyWindow, xxCopyWindow);
|
wrap (pScrPriv, pScreen, CopyWindow, xxCopyWindow);
|
||||||
wrap (pScrPriv, pScreen, PaintWindowBorder, xxPaintWindow);
|
|
||||||
wrap (pScrPriv, pScreen, PaintWindowBackground, xxPaintWindow);
|
|
||||||
#if 0 /* can we leave this out even with backing store enabled ? */
|
#if 0 /* can we leave this out even with backing store enabled ? */
|
||||||
wrap (pScrPriv, pScreen, WindowExposures, xxWindowExposures);
|
wrap (pScrPriv, pScreen, WindowExposures, xxWindowExposures);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -122,8 +122,6 @@ fbSetupScreen(ScreenPtr pScreen,
|
||||||
pScreen->ChangeWindowAttributes = fbChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = fbChangeWindowAttributes;
|
||||||
pScreen->RealizeWindow = fbMapWindow;
|
pScreen->RealizeWindow = fbMapWindow;
|
||||||
pScreen->UnrealizeWindow = fbUnmapWindow;
|
pScreen->UnrealizeWindow = fbUnmapWindow;
|
||||||
pScreen->PaintWindowBackground = fbPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = fbPaintWindow;
|
|
||||||
pScreen->CopyWindow = fbCopyWindow;
|
pScreen->CopyWindow = fbCopyWindow;
|
||||||
pScreen->CreatePixmap = fbCreatePixmap;
|
pScreen->CreatePixmap = fbCreatePixmap;
|
||||||
pScreen->DestroyPixmap = fbDestroyPixmap;
|
pScreen->DestroyPixmap = fbDestroyPixmap;
|
||||||
|
|
|
@ -315,58 +315,3 @@ fbFillRegionTiled (DrawablePtr pDrawable,
|
||||||
fbFinishAccess (&pTile->drawable);
|
fbFinishAccess (&pTile->drawable);
|
||||||
fbFinishAccess (pDrawable);
|
fbFinishAccess (pDrawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
fbPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
WindowPtr pBgWin;
|
|
||||||
|
|
||||||
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:
|
|
||||||
fbFillRegionTiled (&pWin->drawable,
|
|
||||||
pRegion,
|
|
||||||
pWin->background.pixmap);
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
fbFillRegionSolid (&pWin->drawable,
|
|
||||||
pRegion,
|
|
||||||
0,
|
|
||||||
fbReplicatePixel (pWin->background.pixel,
|
|
||||||
pWin->drawable.bitsPerPixel));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
fbFillRegionSolid (&pWin->drawable,
|
|
||||||
pRegion,
|
|
||||||
0,
|
|
||||||
fbReplicatePixel (pWin->border.pixel,
|
|
||||||
pWin->drawable.bitsPerPixel));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (pBgWin = pWin;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
|
|
||||||
fbFillRegionTiled (&pBgWin->drawable,
|
|
||||||
pRegion,
|
|
||||||
pWin->border.pixmap);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
fbValidateDrawable (&pWin->drawable);
|
|
||||||
}
|
|
||||||
|
|
|
@ -119,14 +119,12 @@
|
||||||
#define fbOverlayGeneration wfbOverlayGeneration
|
#define fbOverlayGeneration wfbOverlayGeneration
|
||||||
#define fbOverlayGetScreenPrivateIndex wfbOverlayGetScreenPrivateIndex
|
#define fbOverlayGetScreenPrivateIndex wfbOverlayGetScreenPrivateIndex
|
||||||
#define fbOverlayPaintKey wfbOverlayPaintKey
|
#define fbOverlayPaintKey wfbOverlayPaintKey
|
||||||
#define fbOverlayPaintWindow wfbOverlayPaintWindow
|
|
||||||
#define fbOverlayScreenPrivateIndex wfbOverlayScreenPrivateIndex
|
#define fbOverlayScreenPrivateIndex wfbOverlayScreenPrivateIndex
|
||||||
#define fbOverlaySetupScreen wfbOverlaySetupScreen
|
#define fbOverlaySetupScreen wfbOverlaySetupScreen
|
||||||
#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion
|
#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion
|
||||||
#define fbOverlayWindowExposures wfbOverlayWindowExposures
|
#define fbOverlayWindowExposures wfbOverlayWindowExposures
|
||||||
#define fbOverlayWindowLayer wfbOverlayWindowLayer
|
#define fbOverlayWindowLayer wfbOverlayWindowLayer
|
||||||
#define fbPadPixmap wfbPadPixmap
|
#define fbPadPixmap wfbPadPixmap
|
||||||
#define fbPaintWindow wfbPaintWindow
|
|
||||||
#define fbPictureInit wfbPictureInit
|
#define fbPictureInit wfbPictureInit
|
||||||
#define fbPixmapToRegion wfbPixmapToRegion
|
#define fbPixmapToRegion wfbPixmapToRegion
|
||||||
#define fbPolyArc wfbPolyArc
|
#define fbPolyArc wfbPolyArc
|
||||||
|
|
|
@ -217,7 +217,7 @@ static void QuartzUpdateScreens(void)
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = WindowTable[pScreen->myNum];
|
||||||
AppleWMSetScreenOrigin(pRoot);
|
AppleWMSetScreenOrigin(pRoot);
|
||||||
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
|
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
|
||||||
pScreen->PaintWindowBackground(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
||||||
// QuartzIgnoreNextWarpCursor();
|
// QuartzIgnoreNextWarpCursor();
|
||||||
DefineInitialRootWindow(pRoot);
|
DefineInitialRootWindow(pRoot);
|
||||||
|
|
||||||
|
|
|
@ -306,9 +306,6 @@ static Bool
|
||||||
xprSetupScreen(int index, ScreenPtr pScreen)
|
xprSetupScreen(int index, ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
// Add alpha protecting replacements for fb screen functions
|
// Add alpha protecting replacements for fb screen functions
|
||||||
pScreen->PaintWindowBackground = SafeAlphaPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = SafeAlphaPaintWindow;
|
|
||||||
|
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
{
|
{
|
||||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
||||||
|
|
|
@ -209,8 +209,6 @@ typedef struct _DMXScreenInfo {
|
||||||
UnrealizeWindowProcPtr UnrealizeWindow;
|
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||||
RestackWindowProcPtr RestackWindow;
|
RestackWindowProcPtr RestackWindow;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
|
|
||||||
ResizeWindowProcPtr ResizeWindow;
|
ResizeWindowProcPtr ResizeWindow;
|
||||||
|
|
|
@ -346,9 +346,6 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
|
||||||
DMX_WRAP(UnrealizeWindow, dmxUnrealizeWindow, dmxScreen, pScreen);
|
DMX_WRAP(UnrealizeWindow, dmxUnrealizeWindow, dmxScreen, pScreen);
|
||||||
DMX_WRAP(RestackWindow, dmxRestackWindow, dmxScreen, pScreen);
|
DMX_WRAP(RestackWindow, dmxRestackWindow, dmxScreen, pScreen);
|
||||||
DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen);
|
DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen);
|
||||||
DMX_WRAP(PaintWindowBackground, dmxPaintWindowBackground, dmxScreen,
|
|
||||||
pScreen);
|
|
||||||
DMX_WRAP(PaintWindowBorder, dmxPaintWindowBorder, dmxScreen, pScreen);
|
|
||||||
DMX_WRAP(CopyWindow, dmxCopyWindow, dmxScreen, pScreen);
|
DMX_WRAP(CopyWindow, dmxCopyWindow, dmxScreen, pScreen);
|
||||||
|
|
||||||
DMX_WRAP(ResizeWindow, dmxResizeWindow, dmxScreen, pScreen);
|
DMX_WRAP(ResizeWindow, dmxResizeWindow, dmxScreen, pScreen);
|
||||||
|
@ -485,8 +482,6 @@ Bool dmxCloseScreen(int idx, ScreenPtr pScreen)
|
||||||
DMX_UNWRAP(UnrealizeWindow, dmxScreen, pScreen);
|
DMX_UNWRAP(UnrealizeWindow, dmxScreen, pScreen);
|
||||||
DMX_UNWRAP(RestackWindow, dmxScreen, pScreen);
|
DMX_UNWRAP(RestackWindow, dmxScreen, pScreen);
|
||||||
DMX_UNWRAP(WindowExposures, dmxScreen, pScreen);
|
DMX_UNWRAP(WindowExposures, dmxScreen, pScreen);
|
||||||
DMX_UNWRAP(PaintWindowBackground, dmxScreen, pScreen);
|
|
||||||
DMX_UNWRAP(PaintWindowBorder, dmxScreen, pScreen);
|
|
||||||
DMX_UNWRAP(CopyWindow, dmxScreen, pScreen);
|
DMX_UNWRAP(CopyWindow, dmxScreen, pScreen);
|
||||||
|
|
||||||
DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen);
|
DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen);
|
||||||
|
|
|
@ -796,57 +796,6 @@ void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn,
|
||||||
DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen);
|
DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Paint background of \a pWindow in \a pRegion. */
|
|
||||||
void dmxPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWindow->drawable.pScreen;
|
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
|
||||||
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
|
|
||||||
BoxPtr pBox;
|
|
||||||
int nBox;
|
|
||||||
|
|
||||||
DMX_UNWRAP(PaintWindowBackground, dmxScreen, pScreen);
|
|
||||||
#if 0
|
|
||||||
if (pScreen->PaintWindowBackground)
|
|
||||||
pScreen->PaintWindowBackground(pWindow, pRegion, what);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (pWinPriv->window) {
|
|
||||||
/* Paint window background on back-end server */
|
|
||||||
pBox = REGION_RECTS(pRegion);
|
|
||||||
nBox = REGION_NUM_RECTS(pRegion);
|
|
||||||
while (nBox--) {
|
|
||||||
XClearArea(dmxScreen->beDisplay, pWinPriv->window,
|
|
||||||
pBox->x1 - pWindow->drawable.x,
|
|
||||||
pBox->y1 - pWindow->drawable.y,
|
|
||||||
pBox->x2 - pBox->x1,
|
|
||||||
pBox->y2 - pBox->y1,
|
|
||||||
False);
|
|
||||||
pBox++;
|
|
||||||
}
|
|
||||||
dmxSync(dmxScreen, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
DMX_WRAP(PaintWindowBackground, dmxPaintWindowBackground, dmxScreen, pScreen);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Paint window border for \a pWindow in \a pRegion. */
|
|
||||||
void dmxPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWindow->drawable.pScreen;
|
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
|
||||||
|
|
||||||
DMX_UNWRAP(PaintWindowBorder, dmxScreen, pScreen);
|
|
||||||
#if 0
|
|
||||||
if (pScreen->PaintWindowBorder)
|
|
||||||
pScreen->PaintWindowBorder(pWindow, pRegion, what);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Paint window border on back-end server */
|
|
||||||
|
|
||||||
DMX_WRAP(PaintWindowBorder, dmxPaintWindowBorder, dmxScreen, pScreen);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Move \a pWindow on the back-end server. Determine whether or not it
|
/** Move \a pWindow on the back-end server. Determine whether or not it
|
||||||
* is on or offscreen, and realize it if it is newly on screen and the
|
* is on or offscreen, and realize it if it is newly on screen and the
|
||||||
* lazy window creation optimization is enabled. */
|
* lazy window creation optimization is enabled. */
|
||||||
|
|
|
@ -81,10 +81,6 @@ extern Bool dmxUnrealizeWindow(WindowPtr pWindow);
|
||||||
extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib);
|
extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib);
|
||||||
extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn,
|
extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn,
|
||||||
RegionPtr other_exposed);
|
RegionPtr other_exposed);
|
||||||
extern void dmxPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion,
|
|
||||||
int what);
|
|
||||||
extern void dmxPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion,
|
|
||||||
int what);
|
|
||||||
extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
|
extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
|
||||||
RegionPtr prgnSrc);
|
RegionPtr prgnSrc);
|
||||||
|
|
||||||
|
|
|
@ -1367,74 +1367,6 @@ igsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
|
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
igsPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
KdScreenPriv(pWin->drawable.pScreen);
|
|
||||||
PixmapPtr pTile;
|
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
|
||||||
return;
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
pTile = pWin->background.pixmap;
|
|
||||||
if (igsPatternDimOk (pTile->drawable.width) &&
|
|
||||||
igsPatternDimOk (pTile->drawable.height))
|
|
||||||
{
|
|
||||||
igsFillBoxTiled ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pTile,
|
|
||||||
pWin->drawable.x, pWin->drawable.y, GXcopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
igsFillBoxSolid((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixel, GXcopy, ~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
igsFillBoxSolid((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixel, GXcopy, ~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pTile = pWin->border.pixmap;
|
|
||||||
if (igsPatternDimOk (pTile->drawable.width) &&
|
|
||||||
igsPatternDimOk (pTile->drawable.height))
|
|
||||||
{
|
|
||||||
igsFillBoxTiled ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pTile,
|
|
||||||
pWin->drawable.x, pWin->drawable.y, GXcopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
KdCheckPaintWindow (pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
igsDrawInit (ScreenPtr pScreen)
|
igsDrawInit (ScreenPtr pScreen)
|
||||||
|
@ -1453,8 +1385,6 @@ igsDrawInit (ScreenPtr pScreen)
|
||||||
*/
|
*/
|
||||||
pScreen->CreateGC = igsCreateGC;
|
pScreen->CreateGC = igsCreateGC;
|
||||||
pScreen->CopyWindow = igsCopyWindow;
|
pScreen->CopyWindow = igsCopyWindow;
|
||||||
pScreen->PaintWindowBackground = igsPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = igsPaintWindow;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize patterns
|
* Initialize patterns
|
||||||
|
|
|
@ -470,7 +470,6 @@ void s3CursorDisable (ScreenPtr pScreen);
|
||||||
void s3CursorFini (ScreenPtr pScreen);
|
void s3CursorFini (ScreenPtr pScreen);
|
||||||
void s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdefs);
|
void s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdefs);
|
||||||
|
|
||||||
void s3DumbPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
void s3DumbCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
void s3DumbCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||||
|
|
||||||
Bool s3DrawInit (ScreenPtr pScreen);
|
Bool s3DrawInit (ScreenPtr pScreen);
|
||||||
|
|
|
@ -2261,71 +2261,6 @@ s3PaintKey (DrawablePtr pDrawable,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
|
||||||
s3PaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
SetupS3(pWin->drawable.pScreen);
|
|
||||||
s3ScreenInfo(pScreenPriv);
|
|
||||||
s3PatternPtr pPattern;
|
|
||||||
|
|
||||||
DRAW_DEBUG ((DEBUG_PAINT_WINDOW, "s3PaintWindow 0x%x extents %d %d %d %d n %d",
|
|
||||||
pWin->drawable.id,
|
|
||||||
pRegion->extents.x1, pRegion->extents.y1,
|
|
||||||
pRegion->extents.x2, pRegion->extents.y2,
|
|
||||||
REGION_NUM_RECTS(pRegion)));
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
|
||||||
return;
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
pPattern = s3GetWindowPrivate(pWin);
|
|
||||||
if (pPattern)
|
|
||||||
{
|
|
||||||
s3FillBoxPattern ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
GXcopy, ~0, pPattern);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
s3FillBoxSolid((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixel, GXcopy, ~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
#ifndef S3_TRIO
|
|
||||||
if (s3s->fbmap[1] >= 0)
|
|
||||||
fbOverlayUpdateLayerRegion (pWin->drawable.pScreen,
|
|
||||||
fbOverlayWindowLayer (pWin),
|
|
||||||
pRegion);
|
|
||||||
#endif
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
s3FillBoxSolid((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixel, GXcopy, ~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
KdCheckPaintWindow (pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
s3CopyWindowProc (DrawablePtr pSrcDrawable,
|
s3CopyWindowProc (DrawablePtr pSrcDrawable,
|
||||||
DrawablePtr pDstDrawable,
|
DrawablePtr pDstDrawable,
|
||||||
|
@ -3006,55 +2941,6 @@ s3_24CreateWindow(WindowPtr pWin)
|
||||||
return fbCreateWindow (pWin);
|
return fbCreateWindow (pWin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
s3_24PaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
SetupS3(pWin->drawable.pScreen);
|
|
||||||
s3PatternPtr pPattern;
|
|
||||||
|
|
||||||
DRAW_DEBUG ((DEBUG_PAINT_WINDOW, "s3PaintWindow 0x%x extents %d %d %d %d n %d",
|
|
||||||
pWin->drawable.id,
|
|
||||||
pRegion->extents.x1, pRegion->extents.y1,
|
|
||||||
pRegion->extents.x2, pRegion->extents.y2,
|
|
||||||
REGION_NUM_RECTS(pRegion)));
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
|
||||||
return;
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixel:
|
|
||||||
if (ok24(pWin->background.pixel))
|
|
||||||
{
|
|
||||||
s3_24FillBoxSolid((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixel, GXcopy, ~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel && ok24(pWin->border.pixel))
|
|
||||||
{
|
|
||||||
s3_24FillBoxSolid((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixel, GXcopy, ~0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
KdCheckPaintWindow (pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
s3DrawInit (ScreenPtr pScreen)
|
s3DrawInit (ScreenPtr pScreen)
|
||||||
|
@ -3089,8 +2975,6 @@ s3DrawInit (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
pScreen->CreateGC = s3_24CreateGC;
|
pScreen->CreateGC = s3_24CreateGC;
|
||||||
pScreen->CreateWindow = s3_24CreateWindow;
|
pScreen->CreateWindow = s3_24CreateWindow;
|
||||||
pScreen->PaintWindowBackground = s3_24PaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = s3_24PaintWindow;
|
|
||||||
pScreen->CopyWindow = s3CopyWindow;
|
pScreen->CopyWindow = s3CopyWindow;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3109,8 +2993,6 @@ s3DrawInit (ScreenPtr pScreen)
|
||||||
pScreen->CreateWindow = s3CreateWindow;
|
pScreen->CreateWindow = s3CreateWindow;
|
||||||
pScreen->ChangeWindowAttributes = s3ChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = s3ChangeWindowAttributes;
|
||||||
pScreen->DestroyWindow = s3DestroyWindow;
|
pScreen->DestroyWindow = s3DestroyWindow;
|
||||||
pScreen->PaintWindowBackground = s3PaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = s3PaintWindow;
|
|
||||||
#ifndef S3_TRIO
|
#ifndef S3_TRIO
|
||||||
if (pScreenPriv->screen->fb[1].depth)
|
if (pScreenPriv->screen->fb[1].depth)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1537,75 +1537,6 @@ sisCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
|
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
sisPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
KdScreenPriv(pWin->drawable.pScreen);
|
|
||||||
PixmapPtr pTile;
|
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
|
||||||
return;
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
pTile = pWin->background.pixmap;
|
|
||||||
if (sisPatternDimOk (pTile->drawable.width) &&
|
|
||||||
sisPatternDimOk (pTile->drawable.height))
|
|
||||||
{
|
|
||||||
sisFillBoxTiled ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pTile,
|
|
||||||
pWin->drawable.x, pWin->drawable.y, GXcopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
sisFillBoxSolid((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixel, GXcopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
sisFillBoxSolid((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixel, GXcopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pTile = pWin->border.pixmap;
|
|
||||||
if (sisPatternDimOk (pTile->drawable.width) &&
|
|
||||||
sisPatternDimOk (pTile->drawable.height))
|
|
||||||
{
|
|
||||||
sisFillBoxTiled ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pTile,
|
|
||||||
pWin->drawable.x, pWin->drawable.y, GXcopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
KdCheckPaintWindow (pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
sisDrawInit (ScreenPtr pScreen)
|
sisDrawInit (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
@ -1621,8 +1552,6 @@ sisDrawInit (ScreenPtr pScreen)
|
||||||
*/
|
*/
|
||||||
pScreen->CreateGC = sisCreateGC;
|
pScreen->CreateGC = sisCreateGC;
|
||||||
pScreen->CopyWindow = sisCopyWindow;
|
pScreen->CopyWindow = sisCopyWindow;
|
||||||
pScreen->PaintWindowBackground = sisPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = sisPaintWindow;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1009,52 +1009,6 @@ kaaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
|
||||||
kaaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
|
||||||
return;
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixel:
|
|
||||||
kaaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel);
|
|
||||||
return;
|
|
||||||
#if 0
|
|
||||||
case BackgroundPixmap:
|
|
||||||
kaaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap);
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
kaaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
else
|
|
||||||
{
|
|
||||||
kaaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
KdCheckPaintWindow (pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
kaaDrawInit (ScreenPtr pScreen,
|
kaaDrawInit (ScreenPtr pScreen,
|
||||||
KaaScreenInfoPtr pScreenInfo)
|
KaaScreenInfoPtr pScreenInfo)
|
||||||
|
@ -1091,8 +1045,6 @@ kaaDrawInit (ScreenPtr pScreen,
|
||||||
*/
|
*/
|
||||||
pScreen->CreateGC = kaaCreateGC;
|
pScreen->CreateGC = kaaCreateGC;
|
||||||
pScreen->CopyWindow = kaaCopyWindow;
|
pScreen->CopyWindow = kaaCopyWindow;
|
||||||
pScreen->PaintWindowBackground = kaaPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = kaaPaintWindow;
|
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
if (ps) {
|
if (ps) {
|
||||||
ps->Composite = kaaComposite;
|
ps->Composite = kaaComposite;
|
||||||
|
|
|
@ -223,14 +223,6 @@ KdCheckGetSpans (DrawablePtr pDrawable,
|
||||||
fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
|
fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
KdCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
kaaWaitSync (pWin->drawable.pScreen);
|
|
||||||
kaaDrawableDirty ((DrawablePtr)pWin);
|
|
||||||
fbPaintWindow (pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
{
|
{
|
||||||
|
@ -265,8 +257,6 @@ KdScreenInitAsync (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
pScreen->GetImage = KdCheckGetImage;
|
pScreen->GetImage = KdCheckGetImage;
|
||||||
pScreen->GetSpans = KdCheckGetSpans;
|
pScreen->GetSpans = KdCheckGetSpans;
|
||||||
pScreen->PaintWindowBackground = KdCheckPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = KdCheckPaintWindow;
|
|
||||||
pScreen->CopyWindow = KdCheckCopyWindow;
|
pScreen->CopyWindow = KdCheckCopyWindow;
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
KdPictureInitAsync (pScreen);
|
KdPictureInitAsync (pScreen);
|
||||||
|
|
|
@ -611,9 +611,6 @@ KdCheckGetSpans (DrawablePtr pDrawable,
|
||||||
int nspans,
|
int nspans,
|
||||||
char *pdstStart);
|
char *pdstStart);
|
||||||
|
|
||||||
void
|
|
||||||
KdCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||||
|
|
||||||
|
|
|
@ -98,8 +98,6 @@ typedef struct _RACScreen {
|
||||||
GetImageProcPtr GetImage;
|
GetImageProcPtr GetImage;
|
||||||
GetSpansProcPtr GetSpans;
|
GetSpansProcPtr GetSpans;
|
||||||
SourceValidateProcPtr SourceValidate;
|
SourceValidateProcPtr SourceValidate;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
ClearToBackgroundProcPtr ClearToBackground;
|
ClearToBackgroundProcPtr ClearToBackground;
|
||||||
CreatePixmapProcPtr CreatePixmap;
|
CreatePixmapProcPtr CreatePixmap;
|
||||||
|
@ -139,8 +137,6 @@ static void RACGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
|
||||||
int *pwidth, int nspans, char *pdstStart);
|
int *pwidth, int nspans, char *pdstStart);
|
||||||
static void RACSourceValidate (DrawablePtr pDrawable,
|
static void RACSourceValidate (DrawablePtr pDrawable,
|
||||||
int x, int y, int width, int height );
|
int x, int y, int width, int height );
|
||||||
static void RACPaintWindowBackground(WindowPtr pWin, RegionPtr prgn, int what);
|
|
||||||
static void RACPaintWindowBorder(WindowPtr pWin, RegionPtr prgn, int what);
|
|
||||||
static void RACCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
|
static void RACCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
|
||||||
RegionPtr prgnSrc );
|
RegionPtr prgnSrc );
|
||||||
static void RACClearToBackground (WindowPtr pWin, int x, int y,
|
static void RACClearToBackground (WindowPtr pWin, int x, int y,
|
||||||
|
@ -296,8 +292,6 @@ xf86RACInit(ScreenPtr pScreen, unsigned int flag)
|
||||||
WRAP_SCREEN_COND(GetImage, RACGetImage, RAC_FB);
|
WRAP_SCREEN_COND(GetImage, RACGetImage, RAC_FB);
|
||||||
WRAP_SCREEN_COND(GetSpans, RACGetSpans, RAC_FB);
|
WRAP_SCREEN_COND(GetSpans, RACGetSpans, RAC_FB);
|
||||||
WRAP_SCREEN_COND(SourceValidate, RACSourceValidate, RAC_FB);
|
WRAP_SCREEN_COND(SourceValidate, RACSourceValidate, RAC_FB);
|
||||||
WRAP_SCREEN_COND(PaintWindowBackground, RACPaintWindowBackground, RAC_FB);
|
|
||||||
WRAP_SCREEN_COND(PaintWindowBorder, RACPaintWindowBorder, RAC_FB);
|
|
||||||
WRAP_SCREEN_COND(CopyWindow, RACCopyWindow, RAC_FB);
|
WRAP_SCREEN_COND(CopyWindow, RACCopyWindow, RAC_FB);
|
||||||
WRAP_SCREEN_COND(ClearToBackground, RACClearToBackground, RAC_FB);
|
WRAP_SCREEN_COND(ClearToBackground, RACClearToBackground, RAC_FB);
|
||||||
WRAP_SCREEN_COND(CreatePixmap, RACCreatePixmap, RAC_FB);
|
WRAP_SCREEN_COND(CreatePixmap, RACCreatePixmap, RAC_FB);
|
||||||
|
@ -341,8 +335,6 @@ RACCloseScreen (int i, ScreenPtr pScreen)
|
||||||
UNWRAP_SCREEN(GetImage);
|
UNWRAP_SCREEN(GetImage);
|
||||||
UNWRAP_SCREEN(GetSpans);
|
UNWRAP_SCREEN(GetSpans);
|
||||||
UNWRAP_SCREEN(SourceValidate);
|
UNWRAP_SCREEN(SourceValidate);
|
||||||
UNWRAP_SCREEN(PaintWindowBackground);
|
|
||||||
UNWRAP_SCREEN(PaintWindowBorder);
|
|
||||||
UNWRAP_SCREEN(CopyWindow);
|
UNWRAP_SCREEN(CopyWindow);
|
||||||
UNWRAP_SCREEN(ClearToBackground);
|
UNWRAP_SCREEN(ClearToBackground);
|
||||||
UNWRAP_SCREEN(SaveScreen);
|
UNWRAP_SCREEN(SaveScreen);
|
||||||
|
@ -426,38 +418,6 @@ RACSourceValidate (
|
||||||
SCREEN_EPILOG (SourceValidate, RACSourceValidate);
|
SCREEN_EPILOG (SourceValidate, RACSourceValidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
RACPaintWindowBackground(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr prgn,
|
|
||||||
int what
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
DPRINT_S("RACPaintWindowBackground",pScreen->myNum);
|
|
||||||
SCREEN_PROLOG (PaintWindowBackground);
|
|
||||||
ENABLE;
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, prgn, what);
|
|
||||||
SCREEN_EPILOG (PaintWindowBackground, RACPaintWindowBackground);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
RACPaintWindowBorder(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr prgn,
|
|
||||||
int what
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
DPRINT_S("RACPaintWindowBorder",pScreen->myNum);
|
|
||||||
SCREEN_PROLOG (PaintWindowBorder);
|
|
||||||
ENABLE;
|
|
||||||
(*pScreen->PaintWindowBorder) (pWin, prgn, what);
|
|
||||||
SCREEN_EPILOG (PaintWindowBorder, RACPaintWindowBorder);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
RACCopyWindow(
|
RACCopyWindow(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
|
|
|
@ -35,11 +35,6 @@
|
||||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||||
|
|
||||||
static Bool ShadowCloseScreen (int i, ScreenPtr pScreen);
|
static Bool ShadowCloseScreen (int i, ScreenPtr pScreen);
|
||||||
static void ShadowPaintWindow (
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr prgn,
|
|
||||||
int what
|
|
||||||
);
|
|
||||||
static void ShadowCopyWindow(
|
static void ShadowCopyWindow(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
DDXPointRec ptOldOrg,
|
DDXPointRec ptOldOrg,
|
||||||
|
@ -82,8 +77,6 @@ typedef struct {
|
||||||
RefreshAreaFuncPtr preRefresh;
|
RefreshAreaFuncPtr preRefresh;
|
||||||
RefreshAreaFuncPtr postRefresh;
|
RefreshAreaFuncPtr postRefresh;
|
||||||
CloseScreenProcPtr CloseScreen;
|
CloseScreenProcPtr CloseScreen;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
CreateGCProcPtr CreateGC;
|
CreateGCProcPtr CreateGC;
|
||||||
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
|
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
|
||||||
|
@ -200,8 +193,6 @@ ShadowFBInit2 (
|
||||||
pPriv->vtSema = TRUE;
|
pPriv->vtSema = TRUE;
|
||||||
|
|
||||||
pPriv->CloseScreen = pScreen->CloseScreen;
|
pPriv->CloseScreen = pScreen->CloseScreen;
|
||||||
pPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
|
|
||||||
pPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
|
|
||||||
pPriv->CopyWindow = pScreen->CopyWindow;
|
pPriv->CopyWindow = pScreen->CopyWindow;
|
||||||
pPriv->CreateGC = pScreen->CreateGC;
|
pPriv->CreateGC = pScreen->CreateGC;
|
||||||
pPriv->ModifyPixmapHeader = pScreen->ModifyPixmapHeader;
|
pPriv->ModifyPixmapHeader = pScreen->ModifyPixmapHeader;
|
||||||
|
@ -210,8 +201,6 @@ ShadowFBInit2 (
|
||||||
pPriv->LeaveVT = pScrn->LeaveVT;
|
pPriv->LeaveVT = pScrn->LeaveVT;
|
||||||
|
|
||||||
pScreen->CloseScreen = ShadowCloseScreen;
|
pScreen->CloseScreen = ShadowCloseScreen;
|
||||||
pScreen->PaintWindowBackground = ShadowPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = ShadowPaintWindow;
|
|
||||||
pScreen->CopyWindow = ShadowCopyWindow;
|
pScreen->CopyWindow = ShadowCopyWindow;
|
||||||
pScreen->CreateGC = ShadowCreateGC;
|
pScreen->CreateGC = ShadowCreateGC;
|
||||||
pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader;
|
pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader;
|
||||||
|
@ -276,8 +265,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen)
|
||||||
#endif /* RENDER */
|
#endif /* RENDER */
|
||||||
|
|
||||||
pScreen->CloseScreen = pPriv->CloseScreen;
|
pScreen->CloseScreen = pPriv->CloseScreen;
|
||||||
pScreen->PaintWindowBackground = pPriv->PaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBorder = pPriv->PaintWindowBorder;
|
|
||||||
pScreen->CopyWindow = pPriv->CopyWindow;
|
pScreen->CopyWindow = pPriv->CopyWindow;
|
||||||
pScreen->CreateGC = pPriv->CreateGC;
|
pScreen->CreateGC = pPriv->CreateGC;
|
||||||
pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader;
|
pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader;
|
||||||
|
@ -296,35 +283,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen)
|
||||||
return (*pScreen->CloseScreen) (i, pScreen);
|
return (*pScreen->CloseScreen) (i, pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
ShadowPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr prgn,
|
|
||||||
int what
|
|
||||||
){
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen);
|
|
||||||
int num = 0;
|
|
||||||
|
|
||||||
if(pPriv->vtSema && (num = REGION_NUM_RECTS(prgn)))
|
|
||||||
if(pPriv->preRefresh)
|
|
||||||
(*pPriv->preRefresh)(pPriv->pScrn, num, REGION_RECTS(prgn));
|
|
||||||
|
|
||||||
if(what == PW_BACKGROUND) {
|
|
||||||
pScreen->PaintWindowBackground = pPriv->PaintWindowBackground;
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, prgn, what);
|
|
||||||
pScreen->PaintWindowBackground = ShadowPaintWindow;
|
|
||||||
} else {
|
|
||||||
pScreen->PaintWindowBorder = pPriv->PaintWindowBorder;
|
|
||||||
(*pScreen->PaintWindowBorder) (pWin, prgn, what);
|
|
||||||
pScreen->PaintWindowBorder = ShadowPaintWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(num && pPriv->postRefresh)
|
|
||||||
(*pPriv->postRefresh)(pPriv->pScrn, num, REGION_RECTS(prgn));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ShadowCopyWindow(
|
ShadowCopyWindow(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
|
|
|
@ -16,7 +16,7 @@ libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
|
||||||
xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \
|
xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \
|
||||||
xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \
|
xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \
|
||||||
xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c xaaWrapper.c \
|
xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c xaaWrapper.c \
|
||||||
xaaPaintWin.c xaaRect.c xaaLineMisc.c xaaBitOrder.c \
|
xaaRect.c xaaLineMisc.c xaaBitOrder.c \
|
||||||
xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
|
xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
|
||||||
xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
|
xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
|
||||||
xaaOverlayDF.c xaaStateChange.c xaaPict.c $(POLYSEG) \
|
xaaOverlayDF.c xaaStateChange.c xaaPict.c $(POLYSEG) \
|
||||||
|
|
|
@ -1238,8 +1238,6 @@ typedef struct _XAAInfoRec {
|
||||||
|
|
||||||
GetImageProcPtr GetImage;
|
GetImageProcPtr GetImage;
|
||||||
GetSpansProcPtr GetSpans;
|
GetSpansProcPtr GetSpans;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
BackingStoreSaveAreasProcPtr SaveAreas;
|
BackingStoreSaveAreasProcPtr SaveAreas;
|
||||||
BackingStoreRestoreAreasProcPtr RestoreAreas;
|
BackingStoreRestoreAreasProcPtr RestoreAreas;
|
||||||
|
|
|
@ -147,10 +147,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
||||||
infoRec->GetImage = XAAGetImage;
|
infoRec->GetImage = XAAGetImage;
|
||||||
if(!infoRec->GetSpans)
|
if(!infoRec->GetSpans)
|
||||||
infoRec->GetSpans = XAAGetSpans;
|
infoRec->GetSpans = XAAGetSpans;
|
||||||
if(!infoRec->PaintWindowBackground)
|
|
||||||
infoRec->PaintWindowBackground = XAAPaintWindow;
|
|
||||||
if(!infoRec->PaintWindowBorder)
|
|
||||||
infoRec->PaintWindowBorder = XAAPaintWindow;
|
|
||||||
if(!infoRec->CopyWindow)
|
if(!infoRec->CopyWindow)
|
||||||
infoRec->CopyWindow = XAACopyWindow;
|
infoRec->CopyWindow = XAACopyWindow;
|
||||||
|
|
||||||
|
@ -162,10 +158,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
||||||
pScreen->GetImage = infoRec->GetImage;
|
pScreen->GetImage = infoRec->GetImage;
|
||||||
pScreenPriv->GetSpans = pScreen->GetSpans;
|
pScreenPriv->GetSpans = pScreen->GetSpans;
|
||||||
pScreen->GetSpans = infoRec->GetSpans;
|
pScreen->GetSpans = infoRec->GetSpans;
|
||||||
pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBackground = infoRec->PaintWindowBackground;
|
|
||||||
pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
|
|
||||||
pScreen->PaintWindowBorder = infoRec->PaintWindowBorder;
|
|
||||||
pScreenPriv->CopyWindow = pScreen->CopyWindow;
|
pScreenPriv->CopyWindow = pScreen->CopyWindow;
|
||||||
pScreen->CopyWindow = infoRec->CopyWindow;
|
pScreen->CopyWindow = infoRec->CopyWindow;
|
||||||
pScreenPriv->CreatePixmap = pScreen->CreatePixmap;
|
pScreenPriv->CreatePixmap = pScreen->CreatePixmap;
|
||||||
|
@ -236,8 +228,6 @@ XAACloseScreen (int i, ScreenPtr pScreen)
|
||||||
pScreen->CloseScreen = pScreenPriv->CloseScreen;
|
pScreen->CloseScreen = pScreenPriv->CloseScreen;
|
||||||
pScreen->GetImage = pScreenPriv->GetImage;
|
pScreen->GetImage = pScreenPriv->GetImage;
|
||||||
pScreen->GetSpans = pScreenPriv->GetSpans;
|
pScreen->GetSpans = pScreenPriv->GetSpans;
|
||||||
pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
|
|
||||||
pScreen->CopyWindow = pScreenPriv->CopyWindow;
|
pScreen->CopyWindow = pScreenPriv->CopyWindow;
|
||||||
pScreen->WindowExposures = pScreenPriv->WindowExposures;
|
pScreen->WindowExposures = pScreenPriv->WindowExposures;
|
||||||
pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
|
pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
|
||||||
|
|
|
@ -93,183 +93,6 @@ XAACopyWindow8_32(
|
||||||
REGION_DESTROY(pScreen, borderClip);
|
REGION_DESTROY(pScreen, borderClip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
XAAPaintWindow8_32(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr prgn,
|
|
||||||
int what
|
|
||||||
){
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_DRAWABLE((&pWin->drawable));
|
|
||||||
int nBox = REGION_NUM_RECTS(prgn);
|
|
||||||
BoxPtr pBox = REGION_RECTS(prgn);
|
|
||||||
PixmapPtr pPix = NULL;
|
|
||||||
int depth = pWin->drawable.depth;
|
|
||||||
int fg = 0, pm;
|
|
||||||
|
|
||||||
if(!infoRec->pScrn->vtSema) goto BAILOUT;
|
|
||||||
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch(pWin->backgroundState) {
|
|
||||||
case None: return;
|
|
||||||
case ParentRelative:
|
|
||||||
do { pWin = pWin->parent; }
|
|
||||||
while(pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixel:
|
|
||||||
fg = pWin->background.pixel;
|
|
||||||
break;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
pPix = pWin->background.pixmap;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
fg = pWin->border.pixel;
|
|
||||||
else /* pixmap */
|
|
||||||
pPix = pWin->border.pixmap;
|
|
||||||
break;
|
|
||||||
default: return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(depth == 8) {
|
|
||||||
pm = 0xff000000;
|
|
||||||
fg <<= 24;
|
|
||||||
} else
|
|
||||||
pm = 0x00ffffff;
|
|
||||||
|
|
||||||
if(!pPix) {
|
|
||||||
if(infoRec->FillSolidRects &&
|
|
||||||
!(infoRec->FillSolidRectsFlags & NO_PLANEMASK) &&
|
|
||||||
(!(infoRec->FillSolidRectsFlags & RGB_EQUAL) ||
|
|
||||||
(depth == 8) || CHECK_RGB_EQUAL(fg)))
|
|
||||||
{
|
|
||||||
(*infoRec->FillSolidRects)(infoRec->pScrn, fg, GXcopy,
|
|
||||||
pm, nBox, pBox);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else { /* pixmap */
|
|
||||||
XAAPixmapPtr pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
|
|
||||||
WindowPtr pBgWin = pWin;
|
|
||||||
int xorg, yorg;
|
|
||||||
|
|
||||||
if (what == PW_BORDER) {
|
|
||||||
for (pBgWin = pWin;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
xorg = pBgWin->drawable.x;
|
|
||||||
yorg = pBgWin->drawable.y;
|
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
if(!noPanoramiXExtension) {
|
|
||||||
int index = pScreen->myNum;
|
|
||||||
if(WindowTable[index] == pBgWin) {
|
|
||||||
xorg -= panoramiXdataPtr[index].x;
|
|
||||||
yorg -= panoramiXdataPtr[index].y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(IS_OFFSCREEN_PIXMAP(pPix) && infoRec->FillCacheBltRects) {
|
|
||||||
XAACacheInfoPtr pCache = &(infoRec->ScratchCacheInfoRec);
|
|
||||||
|
|
||||||
pCache->x = pPriv->offscreenArea->box.x1;
|
|
||||||
pCache->y = pPriv->offscreenArea->box.y1;
|
|
||||||
pCache->w = pCache->orig_w =
|
|
||||||
pPriv->offscreenArea->box.x2 - pCache->x;
|
|
||||||
pCache->h = pCache->orig_h =
|
|
||||||
pPriv->offscreenArea->box.y2 - pCache->y;
|
|
||||||
pCache->trans_color = -1;
|
|
||||||
|
|
||||||
(*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, pm,
|
|
||||||
nBox, pBox, xorg, yorg, pCache);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pPriv->flags & DIRTY) {
|
|
||||||
pPriv->flags &= ~(DIRTY | REDUCIBILITY_MASK);
|
|
||||||
pPix->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!(pPriv->flags & REDUCIBILITY_CHECKED) &&
|
|
||||||
(infoRec->CanDoMono8x8 || infoRec->CanDoColor8x8)) {
|
|
||||||
XAACheckTileReducibility(pPix, infoRec->CanDoMono8x8);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pPriv->flags & REDUCIBLE_TO_8x8) {
|
|
||||||
if((pPriv->flags & REDUCIBLE_TO_2_COLOR) &&
|
|
||||||
infoRec->CanDoMono8x8 && infoRec->FillMono8x8PatternRects &&
|
|
||||||
!(infoRec->FillMono8x8PatternRectsFlags & NO_PLANEMASK) &&
|
|
||||||
!(infoRec->FillMono8x8PatternRectsFlags & TRANSPARENCY_ONLY) &&
|
|
||||||
(!(infoRec->FillMono8x8PatternRectsFlags & RGB_EQUAL) ||
|
|
||||||
(CHECK_RGB_EQUAL(pPriv->fg) && CHECK_RGB_EQUAL(pPriv->bg))))
|
|
||||||
{
|
|
||||||
(*infoRec->FillMono8x8PatternRects)(infoRec->pScrn,
|
|
||||||
pPriv->fg, pPriv->bg, GXcopy, pm, nBox, pBox,
|
|
||||||
pPriv->pattern0, pPriv->pattern1, xorg, yorg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(infoRec->CanDoColor8x8 && infoRec->FillColor8x8PatternRects &&
|
|
||||||
!(infoRec->FillColor8x8PatternRectsFlags & NO_PLANEMASK))
|
|
||||||
{
|
|
||||||
XAACacheInfoPtr pCache = (*infoRec->CacheColor8x8Pattern)(
|
|
||||||
infoRec->pScrn, pPix, -1, -1);
|
|
||||||
|
|
||||||
(*infoRec->FillColor8x8PatternRects) (infoRec->pScrn,
|
|
||||||
GXcopy, pm, nBox, pBox, xorg, yorg, pCache);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(infoRec->UsingPixmapCache && infoRec->FillCacheBltRects &&
|
|
||||||
!(infoRec->FillCacheBltRectsFlags & NO_PLANEMASK) &&
|
|
||||||
(pPix->drawable.height <= infoRec->MaxCacheableTileHeight) &&
|
|
||||||
(pPix->drawable.width <= infoRec->MaxCacheableTileWidth))
|
|
||||||
{
|
|
||||||
XAACacheInfoPtr pCache =
|
|
||||||
(*infoRec->CacheTile)(infoRec->pScrn, pPix);
|
|
||||||
(*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, pm,
|
|
||||||
nBox, pBox, xorg, yorg, pCache);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(infoRec->FillImageWriteRects &&
|
|
||||||
!(infoRec->FillImageWriteRectsFlags & NO_PLANEMASK))
|
|
||||||
{
|
|
||||||
(*infoRec->FillImageWriteRects) (infoRec->pScrn, GXcopy,
|
|
||||||
pm, nBox, pBox, xorg, yorg, pPix);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(infoRec->NeedToSync) {
|
|
||||||
(*infoRec->Sync)(infoRec->pScrn);
|
|
||||||
infoRec->NeedToSync = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
BAILOUT:
|
|
||||||
|
|
||||||
if(what == PW_BACKGROUND) {
|
|
||||||
XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground);
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, prgn, what);
|
|
||||||
XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAPaintWindow8_32);
|
|
||||||
} else {
|
|
||||||
XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder);
|
|
||||||
(*pScreen->PaintWindowBorder) (pWin, prgn, what);
|
|
||||||
XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAPaintWindow8_32);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
XAASetColorKey8_32(
|
XAASetColorKey8_32(
|
||||||
ScreenPtr pScreen,
|
ScreenPtr pScreen,
|
||||||
|
@ -295,8 +118,6 @@ XAASetupOverlay8_32Planar(ScreenPtr pScreen)
|
||||||
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
|
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
pScreen->PaintWindowBackground = XAAPaintWindow8_32;
|
|
||||||
pScreen->PaintWindowBorder = XAAPaintWindow8_32;
|
|
||||||
pScreen->CopyWindow = XAACopyWindow8_32;
|
pScreen->CopyWindow = XAACopyWindow8_32;
|
||||||
|
|
||||||
if(!(infoRec->FillSolidRectsFlags & NO_PLANEMASK))
|
if(!(infoRec->FillSolidRectsFlags & NO_PLANEMASK))
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
/* Screen funcs */
|
/* Screen funcs */
|
||||||
|
|
||||||
static void XAAOverCopyWindow(WindowPtr, DDXPointRec, RegionPtr);
|
static void XAAOverCopyWindow(WindowPtr, DDXPointRec, RegionPtr);
|
||||||
static void XAAOverPaintWindow(WindowPtr, RegionPtr, int);
|
|
||||||
static void XAAOverWindowExposures(WindowPtr, RegionPtr, RegionPtr);
|
static void XAAOverWindowExposures(WindowPtr, RegionPtr, RegionPtr);
|
||||||
|
|
||||||
static int XAAOverStippledFillChooser(GCPtr);
|
static int XAAOverStippledFillChooser(GCPtr);
|
||||||
|
@ -194,8 +193,6 @@ XAAInitDualFramebufferOverlay(
|
||||||
/* Overwrite key screen functions. The XAA core will clean up */
|
/* Overwrite key screen functions. The XAA core will clean up */
|
||||||
|
|
||||||
pScreen->CopyWindow = XAAOverCopyWindow;
|
pScreen->CopyWindow = XAAOverCopyWindow;
|
||||||
pScreen->PaintWindowBackground = XAAOverPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = XAAOverPaintWindow;
|
|
||||||
pScreen->WindowExposures = XAAOverWindowExposures;
|
pScreen->WindowExposures = XAAOverWindowExposures;
|
||||||
|
|
||||||
pOverPriv->StippledFillChooser = infoRec->StippledFillChooser;
|
pOverPriv->StippledFillChooser = infoRec->StippledFillChooser;
|
||||||
|
@ -410,56 +407,6 @@ XAAOverCopyWindow(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
XAAOverPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what
|
|
||||||
){
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pScreen);
|
|
||||||
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
|
|
||||||
ScrnInfoPtr pScrn = infoRec->pScrn;
|
|
||||||
|
|
||||||
if(pScrn->vtSema) {
|
|
||||||
if(what == PW_BACKGROUND) {
|
|
||||||
SWITCH_DEPTH(pWin->drawable.depth);
|
|
||||||
(*infoRec->PaintWindowBackground)(pWin, pRegion, what);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
if(pWin->drawable.bitsPerPixel == 8) {
|
|
||||||
SWITCH_DEPTH(8);
|
|
||||||
(*infoRec->PaintWindowBorder)(pWin, pRegion, what);
|
|
||||||
return;
|
|
||||||
} else if (infoRec->FillSolidRects) {
|
|
||||||
SWITCH_DEPTH(8);
|
|
||||||
(*infoRec->FillSolidRects)(pScrn, pScrn->colorKey, GXcopy,
|
|
||||||
~0, REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion));
|
|
||||||
|
|
||||||
SWITCH_DEPTH(pWin->drawable.depth);
|
|
||||||
(*infoRec->PaintWindowBorder)(pWin, pRegion, what);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(infoRec->NeedToSync) {
|
|
||||||
(*infoRec->Sync)(infoRec->pScrn);
|
|
||||||
infoRec->NeedToSync = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(what == PW_BACKGROUND) {
|
|
||||||
XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground);
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, pRegion, what);
|
|
||||||
XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAOverPaintWindow);
|
|
||||||
} else {
|
|
||||||
XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder);
|
|
||||||
(*pScreen->PaintWindowBorder) (pWin, pRegion, what);
|
|
||||||
XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAOverPaintWindow);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
XAAOverWindowExposures(
|
XAAOverWindowExposures(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
|
|
|
@ -1,200 +0,0 @@
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "misc.h"
|
|
||||||
#include "xf86.h"
|
|
||||||
#include "xf86_OSproc.h"
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include "scrnintstr.h"
|
|
||||||
#include "windowstr.h"
|
|
||||||
#include "xf86str.h"
|
|
||||||
#include "xaa.h"
|
|
||||||
#include "xaalocal.h"
|
|
||||||
#include "gcstruct.h"
|
|
||||||
#include "pixmapstr.h"
|
|
||||||
#include "xaawrap.h"
|
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
#include "panoramiX.h"
|
|
||||||
#include "panoramiXsrv.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
|
||||||
XAAPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr prgn,
|
|
||||||
int what
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_DRAWABLE((&pWin->drawable));
|
|
||||||
int nBox = REGION_NUM_RECTS(prgn);
|
|
||||||
BoxPtr pBox = REGION_RECTS(prgn);
|
|
||||||
int fg = -1;
|
|
||||||
PixmapPtr pPix = NULL;
|
|
||||||
|
|
||||||
if(!infoRec->pScrn->vtSema) goto BAILOUT;
|
|
||||||
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch(pWin->backgroundState) {
|
|
||||||
case None: return;
|
|
||||||
case ParentRelative:
|
|
||||||
do { pWin = pWin->parent; }
|
|
||||||
while(pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixel:
|
|
||||||
fg = pWin->background.pixel;
|
|
||||||
break;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
pPix = pWin->background.pixmap;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
fg = pWin->border.pixel;
|
|
||||||
else /* pixmap */
|
|
||||||
pPix = pWin->border.pixmap;
|
|
||||||
break;
|
|
||||||
default: return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(!pPix) {
|
|
||||||
if(infoRec->FillSolidRects &&
|
|
||||||
(!(infoRec->FillSolidRectsFlags & RGB_EQUAL) ||
|
|
||||||
(CHECK_RGB_EQUAL(fg))) ) {
|
|
||||||
(*infoRec->FillSolidRects)(infoRec->pScrn, fg, GXcopy, ~0,
|
|
||||||
nBox, pBox);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else { /* pixmap */
|
|
||||||
XAAPixmapPtr pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
|
|
||||||
WindowPtr pBgWin = pWin;
|
|
||||||
Bool NoCache = FALSE;
|
|
||||||
int xorg, yorg;
|
|
||||||
|
|
||||||
/* Hack so we can use this with the dual framebuffer layers
|
|
||||||
which only support the pixmap cache in the primary bpp */
|
|
||||||
if(pPix->drawable.bitsPerPixel != infoRec->pScrn->bitsPerPixel)
|
|
||||||
NoCache = TRUE;
|
|
||||||
|
|
||||||
if (what == PW_BORDER) {
|
|
||||||
for (pBgWin = pWin;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
xorg = pBgWin->drawable.x;
|
|
||||||
yorg = pBgWin->drawable.y;
|
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
if(!noPanoramiXExtension) {
|
|
||||||
int index = pScreen->myNum;
|
|
||||||
if(WindowTable[index] == pBgWin) {
|
|
||||||
xorg -= panoramiXdataPtr[index].x;
|
|
||||||
yorg -= panoramiXdataPtr[index].y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(IS_OFFSCREEN_PIXMAP(pPix) && infoRec->FillCacheBltRects) {
|
|
||||||
XAACacheInfoPtr pCache = &(infoRec->ScratchCacheInfoRec);
|
|
||||||
|
|
||||||
pCache->x = pPriv->offscreenArea->box.x1;
|
|
||||||
pCache->y = pPriv->offscreenArea->box.y1;
|
|
||||||
pCache->w = pCache->orig_w =
|
|
||||||
pPriv->offscreenArea->box.x2 - pCache->x;
|
|
||||||
pCache->h = pCache->orig_h =
|
|
||||||
pPriv->offscreenArea->box.y2 - pCache->y;
|
|
||||||
pCache->trans_color = -1;
|
|
||||||
|
|
||||||
(*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, ~0,
|
|
||||||
nBox, pBox, xorg, yorg, pCache);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pPriv->flags & DIRTY) {
|
|
||||||
pPriv->flags &= ~(DIRTY | REDUCIBILITY_MASK);
|
|
||||||
pPix->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!(pPriv->flags & REDUCIBILITY_CHECKED) &&
|
|
||||||
(infoRec->CanDoMono8x8 || infoRec->CanDoColor8x8)) {
|
|
||||||
XAACheckTileReducibility(pPix, infoRec->CanDoMono8x8);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pPriv->flags & REDUCIBLE_TO_8x8) {
|
|
||||||
if((pPriv->flags & REDUCIBLE_TO_2_COLOR) &&
|
|
||||||
infoRec->CanDoMono8x8 && infoRec->FillMono8x8PatternRects &&
|
|
||||||
!(infoRec->FillMono8x8PatternRectsFlags & TRANSPARENCY_ONLY) &&
|
|
||||||
(!(infoRec->FillMono8x8PatternRectsFlags & RGB_EQUAL) ||
|
|
||||||
(CHECK_RGB_EQUAL(pPriv->fg) && CHECK_RGB_EQUAL(pPriv->bg)))) {
|
|
||||||
|
|
||||||
(*infoRec->FillMono8x8PatternRects)(infoRec->pScrn,
|
|
||||||
pPriv->fg, pPriv->bg, GXcopy, ~0, nBox, pBox,
|
|
||||||
pPriv->pattern0, pPriv->pattern1, xorg, yorg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(infoRec->CanDoColor8x8 && !NoCache &&
|
|
||||||
infoRec->FillColor8x8PatternRects) {
|
|
||||||
XAACacheInfoPtr pCache = (*infoRec->CacheColor8x8Pattern)(
|
|
||||||
infoRec->pScrn, pPix, -1, -1);
|
|
||||||
|
|
||||||
(*infoRec->FillColor8x8PatternRects) ( infoRec->pScrn,
|
|
||||||
GXcopy, ~0, nBox, pBox, xorg, yorg, pCache);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The window size check is to reduce pixmap cache thrashing
|
|
||||||
when there are lots of little windows with pixmap backgrounds
|
|
||||||
like are sometimes used for buttons, etc... */
|
|
||||||
|
|
||||||
if(infoRec->UsingPixmapCache &&
|
|
||||||
infoRec->FillCacheBltRects && !NoCache &&
|
|
||||||
((what == PW_BORDER) ||
|
|
||||||
(pPix->drawable.height != pWin->drawable.height) ||
|
|
||||||
(pPix->drawable.width != pWin->drawable.width)) &&
|
|
||||||
(pPix->drawable.height <= infoRec->MaxCacheableTileHeight) &&
|
|
||||||
(pPix->drawable.width <= infoRec->MaxCacheableTileWidth)) {
|
|
||||||
|
|
||||||
XAACacheInfoPtr pCache =
|
|
||||||
(*infoRec->CacheTile)(infoRec->pScrn, pPix);
|
|
||||||
(*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, ~0,
|
|
||||||
nBox, pBox, xorg, yorg, pCache);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(infoRec->FillImageWriteRects &&
|
|
||||||
!(infoRec->FillImageWriteRectsFlags & NO_GXCOPY)) {
|
|
||||||
(*infoRec->FillImageWriteRects) (infoRec->pScrn, GXcopy,
|
|
||||||
~0, nBox, pBox, xorg, yorg, pPix);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(infoRec->NeedToSync) {
|
|
||||||
(*infoRec->Sync)(infoRec->pScrn);
|
|
||||||
infoRec->NeedToSync = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
BAILOUT:
|
|
||||||
|
|
||||||
if(what == PW_BACKGROUND) {
|
|
||||||
XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground);
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, prgn, what);
|
|
||||||
XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAPaintWindow);
|
|
||||||
} else {
|
|
||||||
XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder);
|
|
||||||
(*pScreen->PaintWindowBorder) (pWin, prgn, what);
|
|
||||||
XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAPaintWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -259,8 +259,6 @@ typedef struct _XAAStateWrapRec {
|
||||||
XAACacheInfoPtr pCache);
|
XAACacheInfoPtr pCache);
|
||||||
GetImageProcPtr GetImage;
|
GetImageProcPtr GetImage;
|
||||||
GetSpansProcPtr GetSpans;
|
GetSpansProcPtr GetSpans;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
Bool (*SetupForCPUToScreenAlphaTexture2)(ScrnInfoPtr pScrn, int op,
|
Bool (*SetupForCPUToScreenAlphaTexture2)(ScrnInfoPtr pScrn, int op,
|
||||||
|
@ -1449,26 +1447,6 @@ static void XAAStateWrapGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr pp
|
||||||
pwidth, nspans, pdstStart);
|
pwidth, nspans, pdstStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void XAAStateWrapPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion,
|
|
||||||
int what)
|
|
||||||
{
|
|
||||||
GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen);
|
|
||||||
STATE_CHECK_SP(pStatePriv);
|
|
||||||
|
|
||||||
(*pStatePriv->PaintWindowBackground)(pWindow, pRegion,
|
|
||||||
what);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void XAAStateWrapPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion,
|
|
||||||
int what)
|
|
||||||
{
|
|
||||||
GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen);
|
|
||||||
STATE_CHECK_SP(pStatePriv);
|
|
||||||
|
|
||||||
(*pStatePriv->PaintWindowBorder)(pWindow, pRegion,
|
|
||||||
what);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void XAAStateWrapCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
|
static void XAAStateWrapCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
|
||||||
RegionPtr prgnSrc)
|
RegionPtr prgnSrc)
|
||||||
{
|
{
|
||||||
|
@ -1649,8 +1627,6 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
||||||
XAA_STATE_WRAP(WriteColor8x8PatternToCache);
|
XAA_STATE_WRAP(WriteColor8x8PatternToCache);
|
||||||
XAA_STATE_WRAP(GetImage);
|
XAA_STATE_WRAP(GetImage);
|
||||||
XAA_STATE_WRAP(GetSpans);
|
XAA_STATE_WRAP(GetSpans);
|
||||||
XAA_STATE_WRAP(PaintWindowBackground);
|
|
||||||
XAA_STATE_WRAP(PaintWindowBorder);
|
|
||||||
XAA_STATE_WRAP(CopyWindow);
|
XAA_STATE_WRAP(CopyWindow);
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
XAA_STATE_WRAP(SetupForCPUToScreenAlphaTexture2);
|
XAA_STATE_WRAP(SetupForCPUToScreenAlphaTexture2);
|
||||||
|
|
|
@ -54,8 +54,6 @@ typedef struct {
|
||||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||||
CreateWindowProcPtr CreateWindow;
|
CreateWindowProcPtr CreateWindow;
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
PaintWindowProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowProcPtr PaintWindowBorder;
|
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
CreateGCProcPtr CreateGC;
|
CreateGCProcPtr CreateGC;
|
||||||
CreateColormapProcPtr CreateColormap;
|
CreateColormapProcPtr CreateColormap;
|
||||||
|
@ -73,8 +71,6 @@ typedef struct {
|
||||||
CreateScreenResourcesProcPtr wrapCreateScreenResources;
|
CreateScreenResourcesProcPtr wrapCreateScreenResources;
|
||||||
CreateWindowProcPtr wrapCreateWindow;
|
CreateWindowProcPtr wrapCreateWindow;
|
||||||
CopyWindowProcPtr wrapCopyWindow;
|
CopyWindowProcPtr wrapCopyWindow;
|
||||||
PaintWindowProcPtr wrapPaintWindowBackground;
|
|
||||||
PaintWindowProcPtr wrapPaintWindowBorder;
|
|
||||||
WindowExposuresProcPtr wrapWindowExposures;
|
WindowExposuresProcPtr wrapWindowExposures;
|
||||||
CreateGCProcPtr wrapCreateGC;
|
CreateGCProcPtr wrapCreateGC;
|
||||||
CreateColormapProcPtr wrapCreateColormap;
|
CreateColormapProcPtr wrapCreateColormap;
|
||||||
|
@ -208,33 +204,6 @@ xaaWrapperWindowExposures (WindowPtr pWin,
|
||||||
WindowExposures, wrapWindowExposures, xaaWrapperWindowExposures);
|
WindowExposures, wrapWindowExposures, xaaWrapperWindowExposures);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pWin->drawable.pScreen);
|
|
||||||
|
|
||||||
switch (what) {
|
|
||||||
case PW_BORDER:
|
|
||||||
cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
|
||||||
PaintWindowBorder, wrapPaintWindowBorder);
|
|
||||||
|
|
||||||
pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what);
|
|
||||||
cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
|
||||||
PaintWindowBorder, wrapPaintWindowBorder,
|
|
||||||
xaaWrapperPaintWindow);
|
|
||||||
break;
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
|
||||||
PaintWindowBackground, wrapPaintWindowBackground);
|
|
||||||
|
|
||||||
pWin->drawable.pScreen->PaintWindowBackground (pWin, pRegion, what);
|
|
||||||
cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
|
||||||
PaintWindowBackground, wrapPaintWindowBackground,
|
|
||||||
xaaWrapperPaintWindow);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
xaaWrapperCreateColormap(ColormapPtr pmap)
|
xaaWrapperCreateColormap(ColormapPtr pmap)
|
||||||
{
|
{
|
||||||
|
@ -327,8 +296,6 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
|
||||||
get (pScrPriv, pScreen, CreateScreenResources, wrapCreateScreenResources);
|
get (pScrPriv, pScreen, CreateScreenResources, wrapCreateScreenResources);
|
||||||
get (pScrPriv, pScreen, CreateWindow, wrapCreateWindow);
|
get (pScrPriv, pScreen, CreateWindow, wrapCreateWindow);
|
||||||
get (pScrPriv, pScreen, CopyWindow, wrapCopyWindow);
|
get (pScrPriv, pScreen, CopyWindow, wrapCopyWindow);
|
||||||
get (pScrPriv, pScreen, PaintWindowBorder, wrapPaintWindowBorder);
|
|
||||||
get (pScrPriv, pScreen, PaintWindowBackground, wrapPaintWindowBackground);
|
|
||||||
get (pScrPriv, pScreen, WindowExposures, wrapWindowExposures);
|
get (pScrPriv, pScreen, WindowExposures, wrapWindowExposures);
|
||||||
get (pScrPriv, pScreen, CreateGC, wrapCreateGC);
|
get (pScrPriv, pScreen, CreateGC, wrapCreateGC);
|
||||||
get (pScrPriv, pScreen, CreateColormap, wrapCreateColormap);
|
get (pScrPriv, pScreen, CreateColormap, wrapCreateColormap);
|
||||||
|
@ -351,8 +318,6 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
|
||||||
xaaWrapperCreateScreenResources);
|
xaaWrapperCreateScreenResources);
|
||||||
wrap (pScrPriv, pScreen, CreateWindow, xaaWrapperCreateWindow);
|
wrap (pScrPriv, pScreen, CreateWindow, xaaWrapperCreateWindow);
|
||||||
wrap (pScrPriv, pScreen, CopyWindow, xaaWrapperCopyWindow);
|
wrap (pScrPriv, pScreen, CopyWindow, xaaWrapperCopyWindow);
|
||||||
wrap (pScrPriv, pScreen, PaintWindowBorder, xaaWrapperPaintWindow);
|
|
||||||
wrap (pScrPriv, pScreen, PaintWindowBackground, xaaWrapperPaintWindow);
|
|
||||||
wrap (pScrPriv, pScreen, WindowExposures, xaaWrapperWindowExposures);
|
wrap (pScrPriv, pScreen, WindowExposures, xaaWrapperWindowExposures);
|
||||||
wrap (pScrPriv, pScreen, CreateGC, xaaWrapperCreateGC);
|
wrap (pScrPriv, pScreen, CreateGC, xaaWrapperCreateGC);
|
||||||
wrap (pScrPriv, pScreen, CreateColormap, xaaWrapperCreateColormap);
|
wrap (pScrPriv, pScreen, CreateColormap, xaaWrapperCreateColormap);
|
||||||
|
|
|
@ -45,8 +45,6 @@ typedef struct _XAAScreen {
|
||||||
CloseScreenProcPtr CloseScreen;
|
CloseScreenProcPtr CloseScreen;
|
||||||
GetImageProcPtr GetImage;
|
GetImageProcPtr GetImage;
|
||||||
GetSpansProcPtr GetSpans;
|
GetSpansProcPtr GetSpans;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
CreatePixmapProcPtr CreatePixmap;
|
CreatePixmapProcPtr CreatePixmap;
|
||||||
|
@ -1315,14 +1313,6 @@ XAAWritePixmapToCacheLinear(
|
||||||
int bpp, int depth
|
int bpp, int depth
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
XAAPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr prgn,
|
|
||||||
int what
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
XAASolidHorVertLineAsRects(
|
XAASolidHorVertLineAsRects(
|
||||||
ScrnInfoPtr pScrn,
|
ScrnInfoPtr pScrn,
|
||||||
|
|
|
@ -45,7 +45,6 @@ libxf1bppmfb_a_SOURCES = \
|
||||||
mfbline.c \
|
mfbline.c \
|
||||||
mfbmisc.c \
|
mfbmisc.c \
|
||||||
mfbpixmap.c \
|
mfbpixmap.c \
|
||||||
mfbpntwin.c \
|
|
||||||
mfbpolypnt.c \
|
mfbpolypnt.c \
|
||||||
mfbpushpxl.c \
|
mfbpushpxl.c \
|
||||||
mfbscrclse.c \
|
mfbscrclse.c \
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
#define mfbListInstalledColormaps xf1bppListInstalledColormaps
|
#define mfbListInstalledColormaps xf1bppListInstalledColormaps
|
||||||
#define mfbMapWindow xf1bppMapWindow
|
#define mfbMapWindow xf1bppMapWindow
|
||||||
#define mfbPadPixmap xf1bppPadPixmap
|
#define mfbPadPixmap xf1bppPadPixmap
|
||||||
#define mfbPaintWindow xf1bppPaintWindow
|
|
||||||
#define mfbPixmapToRegion xf1bppPixmapToRegion
|
#define mfbPixmapToRegion xf1bppPixmapToRegion
|
||||||
#define mfbPixmapToRegionWeak xf1bppPixmapToRegionWeak
|
#define mfbPixmapToRegionWeak xf1bppPixmapToRegionWeak
|
||||||
#define mfbPolyFillArcSolid xf1bppPolyFillArcSolid
|
#define mfbPolyFillArcSolid xf1bppPolyFillArcSolid
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
#undef mfbListInstalledColormaps
|
#undef mfbListInstalledColormaps
|
||||||
#undef mfbMapWindow
|
#undef mfbMapWindow
|
||||||
#undef mfbPadPixmap
|
#undef mfbPadPixmap
|
||||||
#undef mfbPaintWindow
|
|
||||||
#undef mfbPixmapToRegion
|
#undef mfbPixmapToRegion
|
||||||
#undef mfbPixmapToRegionWeak
|
#undef mfbPixmapToRegionWeak
|
||||||
#undef mfbPolyFillArcSolid
|
#undef mfbPolyFillArcSolid
|
||||||
|
|
|
@ -17,7 +17,6 @@ libxf4bpp_la_SOURCES = \
|
||||||
ppcGetSp.c \
|
ppcGetSp.c \
|
||||||
ppcImg.c \
|
ppcImg.c \
|
||||||
ppcPixmap.c \
|
ppcPixmap.c \
|
||||||
ppcPntWin.c \
|
|
||||||
ppcPolyPnt.c \
|
ppcPolyPnt.c \
|
||||||
ppcQuery.c \
|
ppcQuery.c \
|
||||||
ppcRslvC.c \
|
ppcRslvC.c \
|
||||||
|
|
|
@ -176,7 +176,6 @@ register GCPtr pGC ;
|
||||||
|
|
||||||
pGC->fExpose = TRUE;
|
pGC->fExpose = TRUE;
|
||||||
pGC->freeCompClip = FALSE;
|
pGC->freeCompClip = FALSE;
|
||||||
pGC->pRotatedPixmap = NullPixmap;
|
|
||||||
|
|
||||||
/* GJA: I don't like this code:
|
/* GJA: I don't like this code:
|
||||||
* they allocated a mfbPrivGC, ignore the allocated data and place
|
* they allocated a mfbPrivGC, ignore the allocated data and place
|
||||||
|
@ -200,12 +199,6 @@ xf4bppDestroyGC( pGC )
|
||||||
{
|
{
|
||||||
TRACE( ( "xf4bppDestroyGC(pGC=0x%x)\n", pGC ) ) ;
|
TRACE( ( "xf4bppDestroyGC(pGC=0x%x)\n", pGC ) ) ;
|
||||||
|
|
||||||
/* (ef) 11/9/87 -- ppc doesn't use rotated tile or stipple, but */
|
|
||||||
/* *does* call mfbValidateGC under some conditions. */
|
|
||||||
/* mfbValidateGC *does* use rotated tile and stipple */
|
|
||||||
if ( pGC->pRotatedPixmap )
|
|
||||||
mfbDestroyPixmap( pGC->pRotatedPixmap ) ;
|
|
||||||
|
|
||||||
if ( pGC->freeCompClip && pGC->pCompositeClip )
|
if ( pGC->freeCompClip && pGC->pCompositeClip )
|
||||||
REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
|
REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
|
||||||
if(pGC->ops->devPrivate.val) xfree( pGC->ops );
|
if(pGC->ops->devPrivate.val) xfree( pGC->ops );
|
||||||
|
|
|
@ -205,8 +205,6 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width )
|
||||||
pScreen-> CreateWindow = xf4bppCreateWindowForXYhardware;
|
pScreen-> CreateWindow = xf4bppCreateWindowForXYhardware;
|
||||||
pScreen-> DestroyWindow = xf4bppDestroyWindow;
|
pScreen-> DestroyWindow = xf4bppDestroyWindow;
|
||||||
pScreen-> PositionWindow = xf4bppPositionWindow;
|
pScreen-> PositionWindow = xf4bppPositionWindow;
|
||||||
pScreen-> PaintWindowBackground = xf4bppPaintWindow;
|
|
||||||
pScreen-> PaintWindowBorder = xf4bppPaintWindow;
|
|
||||||
pScreen-> CopyWindow = xf4bppCopyWindow;
|
pScreen-> CopyWindow = xf4bppCopyWindow;
|
||||||
pScreen-> CreatePixmap = xf4bppCreatePixmap;
|
pScreen-> CreatePixmap = xf4bppCreatePixmap;
|
||||||
pScreen-> CreateGC = xf4bppCreateGC;
|
pScreen-> CreateGC = xf4bppCreateGC;
|
||||||
|
@ -219,7 +217,7 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width )
|
||||||
pScreen-> ResolveColor = xf4bppResolveColor;
|
pScreen-> ResolveColor = xf4bppResolveColor;
|
||||||
mfbFillInScreen(pScreen);
|
mfbFillInScreen(pScreen);
|
||||||
|
|
||||||
if (!mfbAllocatePrivates(pScreen, (int*)NULL, (int*)NULL))
|
if (!mfbAllocatePrivates(pScreen, NULL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!miScreenInit(pScreen, pbits, virtx, virty, dpix, dpiy, width,
|
if (!miScreenInit(pScreen, pbits, virtx, virty, dpix, dpiy, width,
|
||||||
|
|
|
@ -1,216 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright IBM Corporation 1987,1988,1989
|
|
||||||
*
|
|
||||||
* All Rights Reserved
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and distribute this software and its
|
|
||||||
* documentation for any purpose and without fee is hereby granted,
|
|
||||||
* provided that the above copyright notice appear in all copies and that
|
|
||||||
* both that copyright notice and this permission notice appear in
|
|
||||||
* supporting documentation, and that the name of IBM not be
|
|
||||||
* used in advertising or publicity pertaining to distribution of the
|
|
||||||
* software without specific, written prior permission.
|
|
||||||
*
|
|
||||||
* IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
||||||
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
* IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
||||||
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
||||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
||||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/***********************************************************
|
|
||||||
|
|
||||||
Copyright (c) 1987 X Consortium
|
|
||||||
|
|
||||||
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
|
|
||||||
X CONSORTIUM 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 of the X Consortium shall not be
|
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
|
||||||
in this Software without prior written authorization from the X Consortium.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
||||||
|
|
||||||
All Rights Reserved
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
|
||||||
documentation for any purpose and without fee is hereby granted,
|
|
||||||
provided that the above copyright notice appear in all copies and that
|
|
||||||
both that copyright notice and this permission notice appear in
|
|
||||||
supporting documentation, and that the name of Digital not be
|
|
||||||
used in advertising or publicity pertaining to distribution of the
|
|
||||||
software without specific, written prior permission.
|
|
||||||
|
|
||||||
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
||||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
||||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
||||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
******************************************************************/
|
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "xf4bpp.h"
|
|
||||||
#include "mfbmap.h"
|
|
||||||
#include "mfb.h"
|
|
||||||
#include "mi.h"
|
|
||||||
#include "scrnintstr.h"
|
|
||||||
#include "ibmTrace.h"
|
|
||||||
|
|
||||||
/* NOTE: These functions only work for visuals up to 31-bits deep */
|
|
||||||
static void xf4bppPaintWindowSolid(
|
|
||||||
WindowPtr,
|
|
||||||
RegionPtr,
|
|
||||||
int
|
|
||||||
);
|
|
||||||
static void xf4bppPaintWindowTile(
|
|
||||||
WindowPtr,
|
|
||||||
RegionPtr,
|
|
||||||
int
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
|
||||||
xf4bppPaintWindow(pWin, pRegion, what)
|
|
||||||
WindowPtr pWin;
|
|
||||||
RegionPtr pRegion;
|
|
||||||
int what;
|
|
||||||
{
|
|
||||||
|
|
||||||
register mfbPrivWin *pPrivWin;
|
|
||||||
pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbGetWindowPrivateIndex()].ptr);
|
|
||||||
|
|
||||||
TRACE(("xf4bppPaintWindow( pWin= 0x%x, pRegion= 0x%x, what= %d )\n",
|
|
||||||
pWin,pRegion,what));
|
|
||||||
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
if (pPrivWin->fastBackground)
|
|
||||||
{
|
|
||||||
xf4bppPaintWindowTile(pWin, pRegion, what);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
xf4bppPaintWindowSolid(pWin, pRegion, what);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
xf4bppPaintWindowSolid(pWin, pRegion, what);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (pPrivWin->fastBorder)
|
|
||||||
{
|
|
||||||
xf4bppPaintWindowTile(pWin, pRegion, what);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
miPaintWindow(pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xf4bppPaintWindowSolid(pWin, pRegion, what)
|
|
||||||
register WindowPtr pWin;
|
|
||||||
register RegionPtr pRegion;
|
|
||||||
int what;
|
|
||||||
{
|
|
||||||
register int nbox;
|
|
||||||
register BoxPtr pbox;
|
|
||||||
register unsigned long int pixel;
|
|
||||||
register unsigned long int pm ;
|
|
||||||
|
|
||||||
TRACE(("xf4bppPaintWindowSolid(pWin= 0x%x, pRegion= 0x%x, what= %d)\n", pWin, pRegion, what));
|
|
||||||
|
|
||||||
if ( !( nbox = REGION_NUM_RECTS(pRegion)))
|
|
||||||
return ;
|
|
||||||
pbox = REGION_RECTS(pRegion);
|
|
||||||
|
|
||||||
if (what == PW_BACKGROUND)
|
|
||||||
pixel = pWin->background.pixel;
|
|
||||||
else
|
|
||||||
pixel = pWin->border.pixel;
|
|
||||||
|
|
||||||
pm = ( 1 << pWin->drawable.depth ) - 1 ;
|
|
||||||
for ( ; nbox-- ; pbox++ ) {
|
|
||||||
/*
|
|
||||||
* call fill routine, the parms are:
|
|
||||||
* fill(color, alu, planes, x, y, width, height);
|
|
||||||
*/
|
|
||||||
xf4bppFillSolid( pWin, pixel, GXcopy, pm, pbox->x1, pbox->y1,
|
|
||||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1 ) ;
|
|
||||||
}
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xf4bppPaintWindowTile(pWin, pRegion, what)
|
|
||||||
register WindowPtr pWin;
|
|
||||||
register RegionPtr pRegion;
|
|
||||||
int what;
|
|
||||||
{
|
|
||||||
register int nbox;
|
|
||||||
register BoxPtr pbox;
|
|
||||||
register PixmapPtr pTile;
|
|
||||||
register unsigned long int pm ;
|
|
||||||
|
|
||||||
TRACE(("xf4bppPaintWindowTile(pWin= 0x%x, pRegion= 0x%x, what= %d)\n", pWin, pRegion, what));
|
|
||||||
|
|
||||||
if ( !( nbox = REGION_NUM_RECTS(pRegion)))
|
|
||||||
return ;
|
|
||||||
pbox = REGION_RECTS(pRegion);
|
|
||||||
|
|
||||||
if (what == PW_BACKGROUND)
|
|
||||||
pTile = pWin->background.pixmap;
|
|
||||||
else
|
|
||||||
pTile = pWin->border.pixmap;
|
|
||||||
|
|
||||||
pm = ( 1 << pWin->drawable.depth ) - 1 ;
|
|
||||||
for ( ; nbox-- ; pbox++ ) {
|
|
||||||
/*
|
|
||||||
* call tile routine, the parms are:
|
|
||||||
* tile(tile, alu, planes, x, y, width, height,xSrc,ySrc);
|
|
||||||
*/
|
|
||||||
xf4bppTileRect(pWin, pTile, GXcopy, pm,
|
|
||||||
pbox->x1, pbox->y1,
|
|
||||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1,
|
|
||||||
pWin->drawable.x, pWin->drawable.y );
|
|
||||||
}
|
|
||||||
return ;
|
|
||||||
}
|
|
|
@ -214,15 +214,7 @@ Bool
|
||||||
xf4bppCreateWindowForXYhardware(pWin)
|
xf4bppCreateWindowForXYhardware(pWin)
|
||||||
register WindowPtr pWin ;
|
register WindowPtr pWin ;
|
||||||
{
|
{
|
||||||
register mfbPrivWin *pPrivWin;
|
|
||||||
|
|
||||||
TRACE(("xf4bppCreateWindowForXYhardware (pWin= 0x%x)\n", pWin));
|
TRACE(("xf4bppCreateWindowForXYhardware (pWin= 0x%x)\n", pWin));
|
||||||
|
|
||||||
pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbGetWindowPrivateIndex()].ptr);
|
|
||||||
pPrivWin->pRotatedBorder = NullPixmap;
|
|
||||||
pPrivWin->pRotatedBackground = NullPixmap;
|
|
||||||
pPrivWin->fastBackground = 0;
|
|
||||||
pPrivWin->fastBorder = 0;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,13 +189,6 @@ PixmapPtr xf4bppCopyPixmap(
|
||||||
PixmapPtr
|
PixmapPtr
|
||||||
);
|
);
|
||||||
|
|
||||||
/* ppcPntWin.c */
|
|
||||||
void xf4bppPaintWindow(
|
|
||||||
WindowPtr,
|
|
||||||
RegionPtr,
|
|
||||||
int
|
|
||||||
);
|
|
||||||
|
|
||||||
/* ppcPolyPnt.c */
|
/* ppcPolyPnt.c */
|
||||||
void xf4bppPolyPoint(
|
void xf4bppPolyPoint(
|
||||||
DrawablePtr,
|
DrawablePtr,
|
||||||
|
|
|
@ -111,13 +111,6 @@ cfb8_32GetImage (
|
||||||
char *pdstLine
|
char *pdstLine
|
||||||
);
|
);
|
||||||
|
|
||||||
void
|
|
||||||
cfb8_32PaintWindow (
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what
|
|
||||||
);
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
cfb8_32ScreenInit (
|
cfb8_32ScreenInit (
|
||||||
ScreenPtr pScreen,
|
ScreenPtr pScreen,
|
||||||
|
@ -135,15 +128,6 @@ cfb8_32FillBoxSolid8 (
|
||||||
unsigned long color
|
unsigned long color
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
cfb8_32FillBoxSolid32 (
|
|
||||||
DrawablePtr pDraw,
|
|
||||||
int nbox,
|
|
||||||
BoxPtr pBox,
|
|
||||||
unsigned long color
|
|
||||||
);
|
|
||||||
|
|
||||||
RegionPtr
|
RegionPtr
|
||||||
cfb8_32CopyPlane(
|
cfb8_32CopyPlane(
|
||||||
DrawablePtr pSrc,
|
DrawablePtr pSrc,
|
||||||
|
|
|
@ -22,97 +22,6 @@
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
|
||||||
cfb8_32PaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what
|
|
||||||
){
|
|
||||||
WindowPtr pBgWin;
|
|
||||||
int xorg, yorg;
|
|
||||||
|
|
||||||
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:
|
|
||||||
xorg = pWin->drawable.x;
|
|
||||||
yorg = pWin->drawable.y;
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
if(!noPanoramiXExtension) {
|
|
||||||
int index = pWin->drawable.pScreen->myNum;
|
|
||||||
if(WindowTable[index] == pWin) {
|
|
||||||
xorg -= panoramiXdataPtr[index].x;
|
|
||||||
yorg -= panoramiXdataPtr[index].y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
cfb32FillBoxTileOddGeneral ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixmap, xorg, yorg, GXcopy,
|
|
||||||
(pWin->drawable.depth == 24) ? 0x00ffffff : 0xff000000);
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
if(pWin->drawable.depth == 24)
|
|
||||||
cfb8_32FillBoxSolid32 ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixel);
|
|
||||||
else
|
|
||||||
cfb8_32FillBoxSolid8 ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->background.pixel);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel) {
|
|
||||||
if(pWin->drawable.depth == 24) {
|
|
||||||
cfb8_32FillBoxSolid32 ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixel);
|
|
||||||
} else
|
|
||||||
cfb8_32FillBoxSolid8 ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixel);
|
|
||||||
} else {
|
|
||||||
for (pBgWin = pWin;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
|
|
||||||
xorg = pBgWin->drawable.x;
|
|
||||||
yorg = pBgWin->drawable.y;
|
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
|
||||||
if(!noPanoramiXExtension) {
|
|
||||||
int index = pWin->drawable.pScreen->myNum;
|
|
||||||
if(WindowTable[index] == pBgWin) {
|
|
||||||
xorg -= panoramiXdataPtr[index].x;
|
|
||||||
yorg -= panoramiXdataPtr[index].y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
cfb32FillBoxTileOddGeneral ((DrawablePtr)pWin,
|
|
||||||
(int)REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion),
|
|
||||||
pWin->border.pixmap, xorg, yorg, GXcopy,
|
|
||||||
(pWin->drawable.depth == 24) ? 0x00ffffff : 0xff000000);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cfb8_32FillBoxSolid8(
|
cfb8_32FillBoxSolid8(
|
||||||
DrawablePtr pDraw,
|
DrawablePtr pDraw,
|
||||||
|
@ -140,41 +49,3 @@ cfb8_32FillBoxSolid8(
|
||||||
pbox++;
|
pbox++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
cfb8_32FillBoxSolid32(
|
|
||||||
DrawablePtr pDraw,
|
|
||||||
int nbox,
|
|
||||||
BoxPtr pbox,
|
|
||||||
unsigned long color
|
|
||||||
){
|
|
||||||
CARD8 *ptr, *data;
|
|
||||||
CARD16 *ptr2, *data2;
|
|
||||||
int pitch, pitch2;
|
|
||||||
int height, width, i;
|
|
||||||
CARD8 c = (CARD8)(color >> 16);
|
|
||||||
CARD16 c2 = (CARD16)color;
|
|
||||||
|
|
||||||
cfbGetByteWidthAndPointer(pDraw, pitch, ptr);
|
|
||||||
cfbGetTypedWidthAndPointer(pDraw, pitch2, ptr2, CARD16, CARD16);
|
|
||||||
ptr += 2; /* point to the third byte */
|
|
||||||
|
|
||||||
while(nbox--) {
|
|
||||||
data = ptr + (pbox->y1 * pitch) + (pbox->x1 << 2);
|
|
||||||
data2 = ptr2 + (pbox->y1 * pitch2) + (pbox->x1 << 1);
|
|
||||||
width = (pbox->x2 - pbox->x1) << 1;
|
|
||||||
height = pbox->y2 - pbox->y1;
|
|
||||||
|
|
||||||
while(height--) {
|
|
||||||
for(i = 0; i < width; i+=2) {
|
|
||||||
data[i << 1] = c;
|
|
||||||
data2[i] = c2;
|
|
||||||
}
|
|
||||||
data += pitch;
|
|
||||||
data2 += pitch2;
|
|
||||||
}
|
|
||||||
pbox++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -56,11 +56,7 @@ cfb8_32AllocatePrivates(ScreenPtr pScreen)
|
||||||
|
|
||||||
|
|
||||||
/* All cfb will have the same GC and Window private indicies */
|
/* All cfb will have the same GC and Window private indicies */
|
||||||
if(!mfbAllocatePrivates(pScreen,&cfbWindowPrivateIndex, &cfbGCPrivateIndex))
|
if(!mfbAllocatePrivates(pScreen, &cfbGCPrivateIndex))
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* The cfb indicies are the mfb indicies. Reallocating them resizes them */
|
|
||||||
if(!AllocateWindowPrivate(pScreen,cfbWindowPrivateIndex,sizeof(cfbPrivWin)))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if(!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC)))
|
if(!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC)))
|
||||||
|
@ -109,8 +105,6 @@ cfb8_32SetupScreen(
|
||||||
pScreen->ChangeWindowAttributes = cfb8_32ChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = cfb8_32ChangeWindowAttributes;
|
||||||
pScreen->RealizeWindow = cfb32MapWindow; /* OK */
|
pScreen->RealizeWindow = cfb32MapWindow; /* OK */
|
||||||
pScreen->UnrealizeWindow = cfb32UnmapWindow; /* OK */
|
pScreen->UnrealizeWindow = cfb32UnmapWindow; /* OK */
|
||||||
pScreen->PaintWindowBackground = cfb8_32PaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = cfb8_32PaintWindow;
|
|
||||||
pScreen->CopyWindow = cfb8_32CopyWindow;
|
pScreen->CopyWindow = cfb8_32CopyWindow;
|
||||||
pScreen->CreatePixmap = cfb32CreatePixmap; /* OK */
|
pScreen->CreatePixmap = cfb32CreatePixmap; /* OK */
|
||||||
pScreen->DestroyPixmap = cfb32DestroyPixmap; /* OK */
|
pScreen->DestroyPixmap = cfb32DestroyPixmap; /* OK */
|
||||||
|
|
|
@ -27,11 +27,6 @@
|
||||||
Bool
|
Bool
|
||||||
cfb8_32CreateWindow(WindowPtr pWin)
|
cfb8_32CreateWindow(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
cfbPrivWin *pPrivWin = cfbGetWindowPrivate(pWin);
|
|
||||||
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
|
|
||||||
pWin->drawable.bitsPerPixel = 32;
|
pWin->drawable.bitsPerPixel = 32;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ static Bool OverlayCreateGC(GCPtr pGC);
|
||||||
static Bool OverlayDestroyPixmap(PixmapPtr);
|
static Bool OverlayDestroyPixmap(PixmapPtr);
|
||||||
static PixmapPtr OverlayCreatePixmap(ScreenPtr, int, int, int);
|
static PixmapPtr OverlayCreatePixmap(ScreenPtr, int, int, int);
|
||||||
static Bool OverlayChangeWindowAttributes(WindowPtr, unsigned long);
|
static Bool OverlayChangeWindowAttributes(WindowPtr, unsigned long);
|
||||||
static void OverlayPaintWindow(WindowPtr, RegionPtr, int);
|
|
||||||
|
|
||||||
/** Funcs **/
|
/** Funcs **/
|
||||||
static void OverlayValidateGC(GCPtr, unsigned long, DrawablePtr);
|
static void OverlayValidateGC(GCPtr, unsigned long, DrawablePtr);
|
||||||
|
@ -159,8 +158,6 @@ typedef struct {
|
||||||
CreatePixmapProcPtr CreatePixmap;
|
CreatePixmapProcPtr CreatePixmap;
|
||||||
DestroyPixmapProcPtr DestroyPixmap;
|
DestroyPixmapProcPtr DestroyPixmap;
|
||||||
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
int LockPrivate;
|
int LockPrivate;
|
||||||
} OverlayScreenRec, *OverlayScreenPtr;
|
} OverlayScreenRec, *OverlayScreenPtr;
|
||||||
|
|
||||||
|
@ -284,16 +281,12 @@ xf86Overlay8Plus32Init (ScreenPtr pScreen)
|
||||||
pScreenPriv->CreatePixmap = pScreen->CreatePixmap;
|
pScreenPriv->CreatePixmap = pScreen->CreatePixmap;
|
||||||
pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap;
|
pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap;
|
||||||
pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
|
pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
|
||||||
pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
|
|
||||||
pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
|
|
||||||
|
|
||||||
pScreen->CreateGC = OverlayCreateGC;
|
pScreen->CreateGC = OverlayCreateGC;
|
||||||
pScreen->CloseScreen = OverlayCloseScreen;
|
pScreen->CloseScreen = OverlayCloseScreen;
|
||||||
pScreen->CreatePixmap = OverlayCreatePixmap;
|
pScreen->CreatePixmap = OverlayCreatePixmap;
|
||||||
pScreen->DestroyPixmap = OverlayDestroyPixmap;
|
pScreen->DestroyPixmap = OverlayDestroyPixmap;
|
||||||
pScreen->ChangeWindowAttributes = OverlayChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = OverlayChangeWindowAttributes;
|
||||||
pScreen->PaintWindowBackground = OverlayPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = OverlayPaintWindow;
|
|
||||||
|
|
||||||
pScreenPriv->LockPrivate = 0;
|
pScreenPriv->LockPrivate = 0;
|
||||||
|
|
||||||
|
@ -402,8 +395,6 @@ OverlayCloseScreen (int i, ScreenPtr pScreen)
|
||||||
pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
|
pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
|
||||||
pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap;
|
pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap;
|
||||||
pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes;
|
||||||
pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
|
|
||||||
|
|
||||||
xfree ((pointer) pScreenPriv);
|
xfree ((pointer) pScreenPriv);
|
||||||
|
|
||||||
|
@ -435,62 +426,6 @@ OverlayChangeWindowAttributes (WindowPtr pWin, unsigned long mask)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
OverlayPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr pReg,
|
|
||||||
int what
|
|
||||||
){
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
|
||||||
OverlayPixmapPtr pixPriv;
|
|
||||||
PixmapPtr oldPix = NULL;
|
|
||||||
|
|
||||||
if(what == PW_BACKGROUND) {
|
|
||||||
if(pWin->drawable.depth == 8) {
|
|
||||||
if(pWin->backgroundState == ParentRelative) {
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pWin->backgroundState == BackgroundPixmap) {
|
|
||||||
oldPix = pWin->background.pixmap;
|
|
||||||
pixPriv = OVERLAY_GET_PIXMAP_PRIVATE(oldPix);
|
|
||||||
/* have to do this here because alot of applications
|
|
||||||
incorrectly assume changes to a pixmap that is
|
|
||||||
a window background go into effect immediatedly */
|
|
||||||
if(pixPriv->dirty & IS_DIRTY)
|
|
||||||
OverlayRefreshPixmap(pWin->background.pixmap);
|
|
||||||
pWin->background.pixmap = pixPriv->pix32;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, pReg, what);
|
|
||||||
pScreen->PaintWindowBackground = OverlayPaintWindow;
|
|
||||||
|
|
||||||
if(oldPix)
|
|
||||||
pWin->background.pixmap = oldPix;
|
|
||||||
} else {
|
|
||||||
if((pWin->drawable.depth == 8) && !pWin->borderIsPixel) {
|
|
||||||
oldPix = pWin->border.pixmap;
|
|
||||||
pixPriv = OVERLAY_GET_PIXMAP_PRIVATE(oldPix);
|
|
||||||
if(pixPriv->dirty & IS_DIRTY)
|
|
||||||
OverlayRefreshPixmap(pWin->border.pixmap);
|
|
||||||
pWin->border.pixmap = pixPriv->pix32;
|
|
||||||
}
|
|
||||||
|
|
||||||
pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
|
|
||||||
(*pScreen->PaintWindowBorder) (pWin, pReg, what);
|
|
||||||
pScreen->PaintWindowBorder = OverlayPaintWindow;
|
|
||||||
|
|
||||||
if(oldPix)
|
|
||||||
pWin->border.pixmap = oldPix;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*********************** GC Funcs *****************************/
|
/*********************** GC Funcs *****************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -927,7 +927,7 @@ xglxWindowExposures (WindowPtr pWin,
|
||||||
REGION_SUBTRACT (pScreen, &ClipList, &pWin->borderClip,
|
REGION_SUBTRACT (pScreen, &ClipList, &pWin->borderClip,
|
||||||
&pWin->winSize);
|
&pWin->winSize);
|
||||||
REGION_INTERSECT (pScreen, &ClipList, &ClipList, (RegionPtr) pReg);
|
REGION_INTERSECT (pScreen, &ClipList, &ClipList, (RegionPtr) pReg);
|
||||||
(*pScreen->PaintWindowBorder) (pWin, &ClipList, PW_BORDER);
|
miPaintWindow(pWin, &ClipList, PW_BORDER);
|
||||||
REGION_UNINIT (pScreen, &ClipList);
|
REGION_UNINIT (pScreen, &ClipList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
12
hw/xgl/xgl.h
12
hw/xgl/xgl.h
|
@ -272,8 +272,6 @@ typedef struct _xglScreen {
|
||||||
CreateWindowProcPtr CreateWindow;
|
CreateWindowProcPtr CreateWindow;
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
DestroyWindowProcPtr DestroyWindow;
|
||||||
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
CreateGCProcPtr CreateGC;
|
CreateGCProcPtr CreateGC;
|
||||||
CloseScreenProcPtr CloseScreen;
|
CloseScreenProcPtr CloseScreen;
|
||||||
|
@ -1090,16 +1088,6 @@ xglCopyWindow (WindowPtr pWin,
|
||||||
DDXPointRec ptOldOrg,
|
DDXPointRec ptOldOrg,
|
||||||
RegionPtr prgnSrc);
|
RegionPtr prgnSrc);
|
||||||
|
|
||||||
void
|
|
||||||
xglPaintWindowBackground (WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what);
|
|
||||||
|
|
||||||
void
|
|
||||||
xglPaintWindowBorder (WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what);
|
|
||||||
|
|
||||||
PixmapPtr
|
PixmapPtr
|
||||||
xglGetWindowPixmap (WindowPtr pWin);
|
xglGetWindowPixmap (WindowPtr pWin);
|
||||||
|
|
||||||
|
|
|
@ -210,8 +210,6 @@ xglScreenInit (ScreenPtr pScreen)
|
||||||
XGL_SCREEN_WRAP (CreateWindow, xglCreateWindow);
|
XGL_SCREEN_WRAP (CreateWindow, xglCreateWindow);
|
||||||
XGL_SCREEN_WRAP (DestroyWindow, xglDestroyWindow);
|
XGL_SCREEN_WRAP (DestroyWindow, xglDestroyWindow);
|
||||||
XGL_SCREEN_WRAP (ChangeWindowAttributes, xglChangeWindowAttributes);
|
XGL_SCREEN_WRAP (ChangeWindowAttributes, xglChangeWindowAttributes);
|
||||||
XGL_SCREEN_WRAP (PaintWindowBackground, xglPaintWindowBackground);
|
|
||||||
XGL_SCREEN_WRAP (PaintWindowBorder, xglPaintWindowBorder);
|
|
||||||
|
|
||||||
XGL_SCREEN_WRAP (CreateGC, xglCreateGC);
|
XGL_SCREEN_WRAP (CreateGC, xglCreateGC);
|
||||||
|
|
||||||
|
|
|
@ -141,181 +141,6 @@ xglCopyWindow (WindowPtr pWin,
|
||||||
REGION_UNINIT (pWin->drawable.pScreen, &rgnDst);
|
REGION_UNINIT (pWin->drawable.pScreen, &rgnDst);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
|
||||||
xglFillRegionSolid (DrawablePtr pDrawable,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
Pixel pixel)
|
|
||||||
{
|
|
||||||
glitz_pixel_format_t format;
|
|
||||||
glitz_surface_t *solid;
|
|
||||||
glitz_buffer_t *buffer;
|
|
||||||
BoxPtr pExtent;
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
XGL_DRAWABLE_PIXMAP_PRIV (pDrawable);
|
|
||||||
XGL_SCREEN_PRIV (pDrawable->pScreen);
|
|
||||||
|
|
||||||
if (!xglPrepareTarget (pDrawable))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
solid = glitz_surface_create (pScreenPriv->drawable,
|
|
||||||
pPixmapPriv->pVisual->format.surface,
|
|
||||||
1, 1, 0, NULL);
|
|
||||||
if (!solid)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
glitz_surface_set_fill (solid, GLITZ_FILL_REPEAT);
|
|
||||||
|
|
||||||
format.fourcc = GLITZ_FOURCC_RGB;
|
|
||||||
format.masks = pPixmapPriv->pVisual->pPixel->masks;
|
|
||||||
format.xoffset = 0;
|
|
||||||
format.skip_lines = 0;
|
|
||||||
format.bytes_per_line = sizeof (CARD32);
|
|
||||||
format.scanline_order = GLITZ_PIXEL_SCANLINE_ORDER_BOTTOM_UP;
|
|
||||||
|
|
||||||
buffer = glitz_buffer_create_for_data (&pixel);
|
|
||||||
|
|
||||||
glitz_set_pixels (solid, 0, 0, 1, 1, &format, buffer);
|
|
||||||
|
|
||||||
glitz_buffer_destroy (buffer);
|
|
||||||
|
|
||||||
pExtent = REGION_EXTENTS (pDrawable->pScreen, pRegion);
|
|
||||||
|
|
||||||
ret = xglSolid (pDrawable,
|
|
||||||
GLITZ_OPERATOR_SRC,
|
|
||||||
solid,
|
|
||||||
NULL,
|
|
||||||
pExtent->x1, pExtent->y1,
|
|
||||||
pExtent->x2 - pExtent->x1, pExtent->y2 - pExtent->y1,
|
|
||||||
REGION_RECTS (pRegion),
|
|
||||||
REGION_NUM_RECTS (pRegion));
|
|
||||||
|
|
||||||
glitz_surface_destroy (solid);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
xglFillRegionTiled (DrawablePtr pDrawable,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
PixmapPtr pTile,
|
|
||||||
int tileX,
|
|
||||||
int tileY)
|
|
||||||
{
|
|
||||||
BoxPtr pExtent;
|
|
||||||
|
|
||||||
pExtent = REGION_EXTENTS (pDrawable->pScreen, pRegion);
|
|
||||||
|
|
||||||
if (xglTile (pDrawable,
|
|
||||||
GLITZ_OPERATOR_SRC,
|
|
||||||
pTile,
|
|
||||||
tileX, tileY,
|
|
||||||
NULL,
|
|
||||||
pExtent->x1, pExtent->y1,
|
|
||||||
pExtent->x2 - pExtent->x1, pExtent->y2 - pExtent->y1,
|
|
||||||
REGION_RECTS (pRegion),
|
|
||||||
REGION_NUM_RECTS (pRegion)))
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
xglPaintWindowBackground (WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
XGL_SCREEN_PRIV (pScreen);
|
|
||||||
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, pRegion, what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
if (xglFillRegionTiled (&pWin->drawable,
|
|
||||||
pRegion,
|
|
||||||
pWin->background.pixmap,
|
|
||||||
-pWin->drawable.x,
|
|
||||||
-pWin->drawable.y))
|
|
||||||
{
|
|
||||||
xglAddCurrentBitDamage (&pWin->drawable);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!xglSyncBits (&pWin->background.pixmap->drawable, NullBox))
|
|
||||||
FatalError (XGL_SW_FAILURE_STRING);
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
if (xglFillRegionSolid (&pWin->drawable,
|
|
||||||
pRegion,
|
|
||||||
pWin->background.pixel))
|
|
||||||
{
|
|
||||||
xglAddCurrentBitDamage (&pWin->drawable);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
XGL_WINDOW_FALLBACK_PROLOGUE (pWin, PaintWindowBackground);
|
|
||||||
(*pScreen->PaintWindowBackground) (pWin, pRegion, what);
|
|
||||||
XGL_WINDOW_FALLBACK_EPILOGUE (pWin, pRegion, PaintWindowBackground,
|
|
||||||
xglPaintWindowBackground);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
xglPaintWindowBorder (WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
XGL_SCREEN_PRIV (pScreen);
|
|
||||||
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
if (xglFillRegionSolid (&pWin->drawable,
|
|
||||||
pRegion,
|
|
||||||
pWin->border.pixel))
|
|
||||||
{
|
|
||||||
xglAddCurrentBitDamage (&pWin->drawable);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WindowPtr pBgWin = pWin;
|
|
||||||
|
|
||||||
while (pBgWin->backgroundState == ParentRelative)
|
|
||||||
pBgWin = pBgWin->parent;
|
|
||||||
|
|
||||||
if (xglFillRegionTiled (&pBgWin->drawable,
|
|
||||||
pRegion,
|
|
||||||
pWin->border.pixmap,
|
|
||||||
-pBgWin->drawable.x,
|
|
||||||
-pBgWin->drawable.y))
|
|
||||||
{
|
|
||||||
xglAddCurrentBitDamage (&pWin->drawable);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!xglSyncBits (&pWin->border.pixmap->drawable, NullBox))
|
|
||||||
FatalError (XGL_SW_FAILURE_STRING);
|
|
||||||
}
|
|
||||||
|
|
||||||
XGL_WINDOW_FALLBACK_PROLOGUE (pWin, PaintWindowBorder);
|
|
||||||
(*pScreen->PaintWindowBorder) (pWin, pRegion, what);
|
|
||||||
XGL_WINDOW_FALLBACK_EPILOGUE (pWin, pRegion, PaintWindowBorder,
|
|
||||||
xglPaintWindowBorder);
|
|
||||||
}
|
|
||||||
|
|
||||||
PixmapPtr
|
PixmapPtr
|
||||||
xglGetWindowPixmap (WindowPtr pWin)
|
xglGetWindowPixmap (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
|
|
|
@ -294,8 +294,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
||||||
pScreen->UnrealizeWindow = xnestUnrealizeWindow;
|
pScreen->UnrealizeWindow = xnestUnrealizeWindow;
|
||||||
pScreen->PostValidateTree = NULL;
|
pScreen->PostValidateTree = NULL;
|
||||||
pScreen->WindowExposures = xnestWindowExposures;
|
pScreen->WindowExposures = xnestWindowExposures;
|
||||||
pScreen->PaintWindowBackground = xnestPaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBorder = xnestPaintWindowBorder;
|
|
||||||
pScreen->CopyWindow = xnestCopyWindow;
|
pScreen->CopyWindow = xnestCopyWindow;
|
||||||
pScreen->ClipNotify = xnestClipNotify;
|
pScreen->ClipNotify = xnestClipNotify;
|
||||||
|
|
||||||
|
|
|
@ -378,30 +378,6 @@ xnestUnrealizeWindow(WindowPtr pWin)
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
xnestPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
BoxPtr pBox;
|
|
||||||
|
|
||||||
xnestConfigureWindow(pWin, CWWidth | CWHeight);
|
|
||||||
|
|
||||||
pBox = REGION_RECTS(pRegion);
|
|
||||||
for (i = 0; i < REGION_NUM_RECTS(pRegion); i++)
|
|
||||||
XClearArea(xnestDisplay, xnestWindow(pWin),
|
|
||||||
pBox[i].x1 - pWin->drawable.x,
|
|
||||||
pBox[i].y1 - pWin->drawable.y,
|
|
||||||
pBox[i].x2 - pBox[i].x1,
|
|
||||||
pBox[i].y2 - pBox[i].y1,
|
|
||||||
False);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
xnestPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
|
|
||||||
{
|
|
||||||
xnestConfigureWindow(pWin, CWBorderWidth);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion)
|
xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,8 +64,6 @@ void xnestConfigureWindow(WindowPtr pWin, unsigned int mask);
|
||||||
Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
|
Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
|
||||||
Bool xnestRealizeWindow(WindowPtr pWin);
|
Bool xnestRealizeWindow(WindowPtr pWin);
|
||||||
Bool xnestUnrealizeWindow(WindowPtr pWin);
|
Bool xnestUnrealizeWindow(WindowPtr pWin);
|
||||||
void xnestPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
void xnestPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
|
void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
|
||||||
void xnestClipNotify(WindowPtr pWin, int dx, int dy);
|
void xnestClipNotify(WindowPtr pWin, int dx, int dy);
|
||||||
void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
|
void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
|
||||||
|
|
|
@ -568,10 +568,6 @@ extern void PclCopyWindow(
|
||||||
extern Bool PclChangeWindowAttributes(
|
extern Bool PclChangeWindowAttributes(
|
||||||
register WindowPtr pWin,
|
register WindowPtr pWin,
|
||||||
register unsigned long mask);
|
register unsigned long mask);
|
||||||
extern void PclPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what);
|
|
||||||
|
|
||||||
/******
|
/******
|
||||||
* Functions in PclFonts.c
|
* Functions in PclFonts.c
|
||||||
|
|
|
@ -201,8 +201,6 @@ InitializePclDriver(
|
||||||
pScreen->RealizeWindow = PclMapWindow;
|
pScreen->RealizeWindow = PclMapWindow;
|
||||||
pScreen->UnrealizeWindow = PclUnmapWindow;
|
pScreen->UnrealizeWindow = PclUnmapWindow;
|
||||||
*/
|
*/
|
||||||
pScreen->PaintWindowBackground = PclPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = PclPaintWindow;
|
|
||||||
pScreen->CopyWindow = PclCopyWindow; /* XXX Hard routine to write! */
|
pScreen->CopyWindow = PclCopyWindow; /* XXX Hard routine to write! */
|
||||||
|
|
||||||
pScreen->CreatePixmap = fbCreatePixmap;
|
pScreen->CreatePixmap = fbCreatePixmap;
|
||||||
|
|
|
@ -198,232 +198,6 @@ PclChangeWindowAttributes(
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This function is largely ripped from miPaintWindow, but modified so
|
|
||||||
* that the background is not painted to the root window, and so that
|
|
||||||
* the backing store is not referenced.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
PclPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what)
|
|
||||||
{
|
|
||||||
|
|
||||||
#define FUNCTION 0
|
|
||||||
#define FOREGROUND 1
|
|
||||||
#define TILE 2
|
|
||||||
#define FILLSTYLE 3
|
|
||||||
#define ABSX 4
|
|
||||||
#define ABSY 5
|
|
||||||
#define CLIPMASK 6
|
|
||||||
#define SUBWINDOW 7
|
|
||||||
#define COUNT_BITS 8
|
|
||||||
|
|
||||||
pointer gcval[7];
|
|
||||||
pointer newValues [COUNT_BITS];
|
|
||||||
|
|
||||||
BITS32 gcmask, index, mask;
|
|
||||||
RegionRec prgnWin;
|
|
||||||
DDXPointRec oldCorner;
|
|
||||||
BoxRec box;
|
|
||||||
WindowPtr pBgWin;
|
|
||||||
GCPtr pGC;
|
|
||||||
register int i;
|
|
||||||
register BoxPtr pbox;
|
|
||||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
register xRectangle *prect;
|
|
||||||
int numRects;
|
|
||||||
|
|
||||||
gcmask = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We don't want to paint a window that has no place to put the
|
|
||||||
* PCL output.
|
|
||||||
*/
|
|
||||||
if( PclGetContextFromWindow( pWin ) == (XpContextPtr)NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (what == PW_BACKGROUND)
|
|
||||||
{
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
(*pWin->parent->drawable.pScreen->PaintWindowBackground)
|
|
||||||
(pWin->parent, pRegion, what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixel:
|
|
||||||
newValues[FOREGROUND] = (pointer)pWin->background.pixel;
|
|
||||||
newValues[FILLSTYLE] = (pointer)FillSolid;
|
|
||||||
gcmask |= GCForeground | GCFillStyle;
|
|
||||||
break;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
newValues[TILE] = (pointer)pWin->background.pixmap;
|
|
||||||
newValues[FILLSTYLE] = (pointer)FillTiled;
|
|
||||||
gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin |
|
|
||||||
GCTileStipYOrigin;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
newValues[FOREGROUND] = (pointer)pWin->border.pixel;
|
|
||||||
newValues[FILLSTYLE] = (pointer)FillSolid;
|
|
||||||
gcmask |= GCForeground | GCFillStyle;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newValues[TILE] = (pointer)pWin->border.pixmap;
|
|
||||||
newValues[FILLSTYLE] = (pointer)FillTiled;
|
|
||||||
gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin
|
|
||||||
| GCTileStipYOrigin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(pRegion) *
|
|
||||||
sizeof(xRectangle));
|
|
||||||
if (!prect)
|
|
||||||
return;
|
|
||||||
|
|
||||||
newValues[FUNCTION] = (pointer)GXcopy;
|
|
||||||
gcmask |= GCFunction | GCClipMask;
|
|
||||||
|
|
||||||
i = pScreen->myNum;
|
|
||||||
|
|
||||||
pBgWin = pWin;
|
|
||||||
if (what == PW_BORDER)
|
|
||||||
{
|
|
||||||
while (pBgWin->backgroundState == ParentRelative)
|
|
||||||
pBgWin = pBgWin->parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen);
|
|
||||||
if (!pGC)
|
|
||||||
{
|
|
||||||
DEALLOCATE_LOCAL(prect);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* mash the clip list so we can paint the border by
|
|
||||||
* mangling the window in place, pretending it
|
|
||||||
* spans the entire screen
|
|
||||||
*/
|
|
||||||
if (what == PW_BORDER)
|
|
||||||
{
|
|
||||||
prgnWin = pWin->clipList;
|
|
||||||
oldCorner.x = pWin->drawable.x;
|
|
||||||
oldCorner.y = pWin->drawable.y;
|
|
||||||
pWin->drawable.x = pWin->drawable.y = 0;
|
|
||||||
box.x1 = 0;
|
|
||||||
box.y1 = 0;
|
|
||||||
box.x2 = pScreen->width;
|
|
||||||
box.y2 = pScreen->height;
|
|
||||||
REGION_INIT(pScreen, &pWin->clipList, &box, 1);
|
|
||||||
pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
|
||||||
newValues[ABSX] = (pointer)(long)pBgWin->drawable.x;
|
|
||||||
newValues[ABSY] = (pointer)(long)pBgWin->drawable.y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newValues[ABSX] = (pointer)0;
|
|
||||||
newValues[ABSY] = (pointer)0;
|
|
||||||
}
|
|
||||||
|
|
||||||
mask = gcmask;
|
|
||||||
gcmask = 0;
|
|
||||||
i = 0;
|
|
||||||
while (mask) {
|
|
||||||
index = lowbit (mask);
|
|
||||||
mask &= ~index;
|
|
||||||
switch (index) {
|
|
||||||
case GCFunction:
|
|
||||||
if ((pointer)(long) pGC->alu != newValues[FUNCTION]) {
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[FUNCTION];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCTileStipXOrigin:
|
|
||||||
if ((pointer)(long) pGC->patOrg.x != newValues[ABSX]) {
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[ABSX];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCTileStipYOrigin:
|
|
||||||
if ((pointer)(long) pGC->patOrg.y != newValues[ABSY]) {
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[ABSY];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCClipMask:
|
|
||||||
if ((pointer)(long) pGC->clientClipType != (pointer)CT_NONE) {
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = (pointer)CT_NONE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCSubwindowMode:
|
|
||||||
if ((pointer)(long) pGC->subWindowMode != newValues[SUBWINDOW]) {
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[SUBWINDOW];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCTile:
|
|
||||||
if (pGC->tileIsPixel ||
|
|
||||||
(pointer) pGC->tile.pixmap != newValues[TILE])
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[TILE];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCFillStyle:
|
|
||||||
if ((pointer)(long) pGC->fillStyle != newValues[FILLSTYLE]) {
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[FILLSTYLE];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCForeground:
|
|
||||||
if ((pointer) pGC->fgPixel != newValues[FOREGROUND]) {
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[FOREGROUND];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gcmask)
|
|
||||||
DoChangeGC(pGC, gcmask, (XID *)gcval, 1);
|
|
||||||
|
|
||||||
if (pWin->drawable.serialNumber != pGC->serialNumber)
|
|
||||||
ValidateGC((DrawablePtr)pWin, pGC);
|
|
||||||
|
|
||||||
numRects = REGION_NUM_RECTS(pRegion);
|
|
||||||
pbox = REGION_RECTS(pRegion);
|
|
||||||
for (i= numRects; --i >= 0; pbox++, prect++)
|
|
||||||
{
|
|
||||||
prect->x = pbox->x1 - pWin->drawable.x;
|
|
||||||
prect->y = pbox->y1 - pWin->drawable.y;
|
|
||||||
prect->width = pbox->x2 - pbox->x1;
|
|
||||||
prect->height = pbox->y2 - pbox->y1;
|
|
||||||
}
|
|
||||||
prect -= numRects;
|
|
||||||
(*pGC->ops->PolyFillRect)((DrawablePtr)pWin, pGC, numRects, prect);
|
|
||||||
DEALLOCATE_LOCAL(prect);
|
|
||||||
|
|
||||||
if (what == PW_BORDER)
|
|
||||||
{
|
|
||||||
REGION_UNINIT(pScreen, &pWin->clipList);
|
|
||||||
pWin->clipList = prgnWin;
|
|
||||||
pWin->drawable.x = oldCorner.x;
|
|
||||||
pWin->drawable.y = oldCorner.y;
|
|
||||||
pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
|
||||||
}
|
|
||||||
FreeScratchGC(pGC);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
Bool
|
Bool
|
||||||
PclDestroyWindow(
|
PclDestroyWindow(
|
||||||
|
|
|
@ -105,7 +105,6 @@ copyright holders.
|
||||||
#define PclUnmapWindow PCLNAME(UnmapWindow)
|
#define PclUnmapWindow PCLNAME(UnmapWindow)
|
||||||
#define PclCopyWindow PCLNAME(CopyWindow)
|
#define PclCopyWindow PCLNAME(CopyWindow)
|
||||||
#define PclChangeWindowAttributes PCLNAME(ChangeWindowAttributes)
|
#define PclChangeWindowAttributes PCLNAME(ChangeWindowAttributes)
|
||||||
#define PclPaintWindow PCLNAME(PaintWindow)
|
|
||||||
#define PclDestroyWindow PCLNAME(DestroyWindow)
|
#define PclDestroyWindow PCLNAME(DestroyWindow)
|
||||||
|
|
||||||
/* PclGC.c */
|
/* PclGC.c */
|
||||||
|
|
|
@ -517,7 +517,6 @@ extern Bool PsUnmapWindow(WindowPtr pWin);
|
||||||
extern void PsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
|
extern void PsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
|
||||||
RegionPtr prgnSrc);
|
RegionPtr prgnSrc);
|
||||||
extern Bool PsChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
|
extern Bool PsChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
|
||||||
extern void PsPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
extern Bool PsDestroyWindow(WindowPtr pWin);
|
extern Bool PsDestroyWindow(WindowPtr pWin);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -169,8 +169,6 @@ InitializePsDriver(ndx, pScreen, argc, argv)
|
||||||
pScreen->ChangeWindowAttributes = PsChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = PsChangeWindowAttributes;
|
||||||
pScreen->RealizeWindow = PsMapWindow;
|
pScreen->RealizeWindow = PsMapWindow;
|
||||||
pScreen->UnrealizeWindow = PsUnmapWindow;
|
pScreen->UnrealizeWindow = PsUnmapWindow;
|
||||||
pScreen->PaintWindowBackground = PsPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = PsPaintWindow;
|
|
||||||
pScreen->CloseScreen = PsCloseScreen;
|
pScreen->CloseScreen = PsCloseScreen;
|
||||||
pScreen->CopyWindow = PsCopyWindow;
|
pScreen->CopyWindow = PsCopyWindow;
|
||||||
/* XXX Hard routine to write! */
|
/* XXX Hard routine to write! */
|
||||||
|
|
|
@ -213,230 +213,6 @@ PsChangeWindowAttributes(
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
PsPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what)
|
|
||||||
{
|
|
||||||
WindowPtr pRoot;
|
|
||||||
|
|
||||||
#define FUNCTION 0
|
|
||||||
#define FOREGROUND 1
|
|
||||||
#define TILE 2
|
|
||||||
#define FILLSTYLE 3
|
|
||||||
#define ABSX 4
|
|
||||||
#define ABSY 5
|
|
||||||
#define CLIPMASK 6
|
|
||||||
#define SUBWINDOW 7
|
|
||||||
#define COUNT_BITS 8
|
|
||||||
|
|
||||||
pointer gcval[7];
|
|
||||||
pointer newValues [COUNT_BITS];
|
|
||||||
|
|
||||||
BITS32 gcmask, index, mask;
|
|
||||||
RegionRec prgnWin;
|
|
||||||
DDXPointRec oldCorner;
|
|
||||||
BoxRec box;
|
|
||||||
WindowPtr pBgWin;
|
|
||||||
GCPtr pGC;
|
|
||||||
register int i;
|
|
||||||
register BoxPtr pbox;
|
|
||||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
register xRectangle *prect;
|
|
||||||
int numRects;
|
|
||||||
|
|
||||||
gcmask = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We don't want to paint a window that has no place to put the
|
|
||||||
* PS output.
|
|
||||||
*/
|
|
||||||
if( PsGetContextFromWindow(pWin)==(XpContextPtr)NULL ) return;
|
|
||||||
|
|
||||||
if( what==PW_BACKGROUND )
|
|
||||||
{
|
|
||||||
switch(pWin->backgroundState)
|
|
||||||
{
|
|
||||||
case None: return;
|
|
||||||
case ParentRelative:
|
|
||||||
(*pWin->parent->drawable.pScreen->PaintWindowBackground)
|
|
||||||
(pWin->parent, pRegion, what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixel:
|
|
||||||
newValues[FOREGROUND] = (pointer)pWin->background.pixel;
|
|
||||||
newValues[FILLSTYLE] = (pointer)FillSolid;
|
|
||||||
gcmask |= GCForeground | GCFillStyle;
|
|
||||||
break;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
newValues[TILE] = (pointer)pWin->background.pixmap;
|
|
||||||
newValues[FILLSTYLE] = (pointer)FillTiled;
|
|
||||||
gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( pWin->borderIsPixel )
|
|
||||||
{
|
|
||||||
newValues[FOREGROUND] = (pointer)pWin->border.pixel;
|
|
||||||
newValues[FILLSTYLE] = (pointer)FillSolid;
|
|
||||||
gcmask |= GCForeground | GCFillStyle;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newValues[TILE] = (pointer)pWin->border.pixmap;
|
|
||||||
newValues[FILLSTYLE] = (pointer)FillTiled;
|
|
||||||
gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(pRegion) *
|
|
||||||
sizeof(xRectangle));
|
|
||||||
if( !prect ) return;
|
|
||||||
|
|
||||||
newValues[FUNCTION] = (pointer)GXcopy;
|
|
||||||
gcmask |= GCFunction | GCClipMask;
|
|
||||||
|
|
||||||
i = pScreen->myNum;
|
|
||||||
pRoot = WindowTable[i];
|
|
||||||
|
|
||||||
pBgWin = pWin;
|
|
||||||
if (what == PW_BORDER)
|
|
||||||
{
|
|
||||||
while( pBgWin->backgroundState==ParentRelative ) pBgWin = pBgWin->parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen);
|
|
||||||
if( !pGC )
|
|
||||||
{
|
|
||||||
DEALLOCATE_LOCAL(prect);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* mash the clip list so we can paint the border by
|
|
||||||
* mangling the window in place, pretending it
|
|
||||||
* spans the entire screen
|
|
||||||
*/
|
|
||||||
if( what==PW_BORDER )
|
|
||||||
{
|
|
||||||
prgnWin = pWin->clipList;
|
|
||||||
oldCorner.x = pWin->drawable.x;
|
|
||||||
oldCorner.y = pWin->drawable.y;
|
|
||||||
pWin->drawable.x = pWin->drawable.y = 0;
|
|
||||||
box.x1 = 0;
|
|
||||||
box.y1 = 0;
|
|
||||||
box.x2 = pScreen->width;
|
|
||||||
box.y2 = pScreen->height;
|
|
||||||
REGION_INIT(pScreen, &pWin->clipList, &box, 1);
|
|
||||||
pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
|
||||||
newValues[ABSX] = (pointer)(long)pBgWin->drawable.x;
|
|
||||||
newValues[ABSY] = (pointer)(long)pBgWin->drawable.y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newValues[ABSX] = (pointer)0;
|
|
||||||
newValues[ABSY] = (pointer)0;
|
|
||||||
}
|
|
||||||
|
|
||||||
mask = gcmask;
|
|
||||||
gcmask = 0;
|
|
||||||
i = 0;
|
|
||||||
while( mask )
|
|
||||||
{
|
|
||||||
index = lowbit (mask);
|
|
||||||
mask &= ~index;
|
|
||||||
switch(index)
|
|
||||||
{
|
|
||||||
case GCFunction:
|
|
||||||
if( (pointer)(long)pGC->alu!=newValues[FUNCTION] )
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[FUNCTION];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCTileStipXOrigin:
|
|
||||||
if( (pointer)(long)pGC->patOrg.x!=newValues[ABSX] )
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[ABSX];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCTileStipYOrigin:
|
|
||||||
if( (pointer)(long)pGC->patOrg.y!=newValues[ABSY] )
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[ABSY];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCClipMask:
|
|
||||||
if( (pointer)pGC->clientClipType!=(pointer)CT_NONE )
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = (pointer)CT_NONE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCSubwindowMode:
|
|
||||||
if( (pointer)pGC->subWindowMode!=newValues[SUBWINDOW] )
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[SUBWINDOW];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCTile:
|
|
||||||
if( pGC->tileIsPixel || (pointer)pGC->tile.pixmap!=newValues[TILE] )
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[TILE];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCFillStyle:
|
|
||||||
if( (pointer)pGC->fillStyle!=newValues[FILLSTYLE] )
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[FILLSTYLE];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GCForeground:
|
|
||||||
if( (pointer)pGC->fgPixel!=newValues[FOREGROUND] )
|
|
||||||
{
|
|
||||||
gcmask |= index;
|
|
||||||
gcval[i++] = newValues[FOREGROUND];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( gcmask ) DoChangeGC(pGC, gcmask, (XID *)gcval, 1);
|
|
||||||
|
|
||||||
if( pWin->drawable.serialNumber!=pGC->serialNumber )
|
|
||||||
ValidateGC((DrawablePtr)pWin, pGC);
|
|
||||||
|
|
||||||
numRects = REGION_NUM_RECTS(pRegion);
|
|
||||||
pbox = REGION_RECTS(pRegion);
|
|
||||||
for( i=numRects ; --i >= 0 ; pbox++,prect++ )
|
|
||||||
{
|
|
||||||
prect->x = pbox->x1 - pWin->drawable.x;
|
|
||||||
prect->y = pbox->y1 - pWin->drawable.y;
|
|
||||||
prect->width = pbox->x2 - pbox->x1;
|
|
||||||
prect->height = pbox->y2 - pbox->y1;
|
|
||||||
}
|
|
||||||
prect -= numRects;
|
|
||||||
(*pGC->ops->PolyFillRect)((DrawablePtr)pWin, pGC, numRects, prect);
|
|
||||||
DEALLOCATE_LOCAL(prect);
|
|
||||||
|
|
||||||
if( what==PW_BORDER )
|
|
||||||
{
|
|
||||||
REGION_UNINIT(pScreen, &pWin->clipList);
|
|
||||||
pWin->clipList = prgnWin;
|
|
||||||
pWin->drawable.x = oldCorner.x;
|
|
||||||
pWin->drawable.y = oldCorner.y;
|
|
||||||
pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
|
||||||
}
|
|
||||||
FreeScratchGC(pGC);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
Bool
|
Bool
|
||||||
PsDestroyWindow(WindowPtr pWin)
|
PsDestroyWindow(WindowPtr pWin)
|
||||||
|
|
|
@ -579,8 +579,6 @@ typedef struct _winPrivScreenRec
|
||||||
ValidateTreeProcPtr ValidateTree;
|
ValidateTreeProcPtr ValidateTree;
|
||||||
PostValidateTreeProcPtr PostValidateTree;
|
PostValidateTreeProcPtr PostValidateTree;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
ClearToBackgroundProcPtr ClearToBackground;
|
ClearToBackgroundProcPtr ClearToBackground;
|
||||||
ClipNotifyProcPtr ClipNotify;
|
ClipNotifyProcPtr ClipNotify;
|
||||||
|
@ -1052,17 +1050,6 @@ winModifyPixmapHeaderNativeGDI (PixmapPtr pPixmap,
|
||||||
pointer pPixData);
|
pointer pPixData);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef XWIN_NATIVEGDI
|
|
||||||
/*
|
|
||||||
* winpntwin.c
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
winPaintWindowNativeGDI (WindowPtr pWin, RegionPtr pRegion, int what);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef XWIN_NATIVEGDI
|
#ifdef XWIN_NATIVEGDI
|
||||||
/*
|
/*
|
||||||
* winpolyline.c
|
* winpolyline.c
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
/*
|
|
||||||
*Copyright (C) 2001-2004 Harold L Hunt II 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 HAROLD L HUNT II 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 of Harold L Hunt II
|
|
||||||
*shall not be used in advertising or otherwise to promote the sale, use
|
|
||||||
*or other dealings in this Software without prior written authorization
|
|
||||||
*from Harold L Hunt II.
|
|
||||||
*
|
|
||||||
* Authors: Harold L Hunt II
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_XWIN_CONFIG_H
|
|
||||||
#include <xwin-config.h>
|
|
||||||
#endif
|
|
||||||
#include "win.h"
|
|
||||||
|
|
||||||
/* See Porting Layer Definition - p. 39
|
|
||||||
* Sometimes implemented as two functions:
|
|
||||||
* PaintWindowBackground (nKind = PW_BACKGROUND)
|
|
||||||
* PaintWindowBorder (nKind = PW_BORDER)
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
winPaintWindowNativeGDI (WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int nKind)
|
|
||||||
{
|
|
||||||
ErrorF ("winPaintWindow()\n");
|
|
||||||
}
|
|
|
@ -717,8 +717,6 @@ winFinishScreenInitNativeGDI (int index,
|
||||||
pScreen->UnrealizeWindow = winUnmapWindowNativeGDI;
|
pScreen->UnrealizeWindow = winUnmapWindowNativeGDI;
|
||||||
|
|
||||||
/* Paint window */
|
/* Paint window */
|
||||||
pScreen->PaintWindowBackground = miPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = miPaintWindow;
|
|
||||||
pScreen->CopyWindow = winCopyWindowNativeGDI;
|
pScreen->CopyWindow = winCopyWindowNativeGDI;
|
||||||
|
|
||||||
/* Fonts */
|
/* Fonts */
|
||||||
|
|
|
@ -477,8 +477,8 @@ typedef struct _Screen {
|
||||||
ValidateTreeProcPtr ValidateTree;
|
ValidateTreeProcPtr ValidateTree;
|
||||||
PostValidateTreeProcPtr PostValidateTree;
|
PostValidateTreeProcPtr PostValidateTree;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
PaintWindowBackgroundProcPtr PaintWindowBackground; /** unused */
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
PaintWindowBorderProcPtr PaintWindowBorder; /** unused */
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
ClearToBackgroundProcPtr ClearToBackground;
|
ClearToBackgroundProcPtr ClearToBackground;
|
||||||
ClipNotifyProcPtr ClipNotify;
|
ClipNotifyProcPtr ClipNotify;
|
||||||
|
|
|
@ -12,7 +12,7 @@ libmfb_gen_sources = mfbseg.c mfbpgbwht.c mfbpgbblak.c mfbpgbinv.c mfbigbwht.c \
|
||||||
DISTCLEANFILES = $(libmfb_gen_sources)
|
DISTCLEANFILES = $(libmfb_gen_sources)
|
||||||
|
|
||||||
libmfb_la_SOURCES = mfbgc.c mfbwindow.c mfbfont.c \
|
libmfb_la_SOURCES = mfbgc.c mfbwindow.c mfbfont.c \
|
||||||
mfbfillrct.c mfbpntwin.c maskbits.c mfbpixmap.c \
|
mfbfillrct.c maskbits.c mfbpixmap.c \
|
||||||
mfbimage.c mfbline.c mfbbres.c mfbhrzvert.c mfbbresd.c \
|
mfbimage.c mfbline.c mfbbres.c mfbhrzvert.c mfbbresd.c \
|
||||||
mfbpushpxl.c mfbzerarc.c mfbfillarc.c \
|
mfbpushpxl.c mfbzerarc.c mfbfillarc.c \
|
||||||
mfbfillsp.c mfbsetsp.c mfbscrinit.c mfbscrclse.c mfbclip.c \
|
mfbfillsp.c mfbsetsp.c mfbscrinit.c mfbscrclse.c mfbclip.c \
|
||||||
|
|
20
mfb/mfb.h
20
mfb/mfb.h
|
@ -649,13 +649,6 @@ extern void mfbFillPolyWhite(
|
||||||
int /*count*/,
|
int /*count*/,
|
||||||
DDXPointPtr /*ptsIn*/
|
DDXPointPtr /*ptsIn*/
|
||||||
);
|
);
|
||||||
/* mfbpntwin.c */
|
|
||||||
|
|
||||||
extern void mfbPaintWindow(
|
|
||||||
WindowPtr /*pWin*/,
|
|
||||||
RegionPtr /*pRegion*/,
|
|
||||||
int /*what*/
|
|
||||||
);
|
|
||||||
/* mfbpolypnt.c */
|
/* mfbpolypnt.c */
|
||||||
|
|
||||||
extern void mfbPolyPoint(
|
extern void mfbPolyPoint(
|
||||||
|
@ -704,7 +697,6 @@ extern Bool mfbCloseScreen(
|
||||||
|
|
||||||
extern Bool mfbAllocatePrivates(
|
extern Bool mfbAllocatePrivates(
|
||||||
ScreenPtr /*pScreen*/,
|
ScreenPtr /*pScreen*/,
|
||||||
int * /*pWinIndex*/,
|
|
||||||
int * /*pGCIndex*/
|
int * /*pGCIndex*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -893,24 +885,12 @@ typedef mfbPrivGC *mfbPrivGCPtr;
|
||||||
/* XXX these should be static, but it breaks the ABI */
|
/* XXX these should be static, but it breaks the ABI */
|
||||||
extern int mfbGCPrivateIndex; /* index into GC private array */
|
extern int mfbGCPrivateIndex; /* index into GC private array */
|
||||||
extern int mfbGetGCPrivateIndex(void);
|
extern int mfbGetGCPrivateIndex(void);
|
||||||
extern int mfbWindowPrivateIndex; /* index into Window private array */
|
|
||||||
extern int mfbGetWindowPrivateIndex(void);
|
|
||||||
#ifdef PIXMAP_PER_WINDOW
|
#ifdef PIXMAP_PER_WINDOW
|
||||||
extern int frameWindowPrivateIndex; /* index into Window private array */
|
extern int frameWindowPrivateIndex; /* index into Window private array */
|
||||||
extern int frameGetWindowPrivateIndex(void);
|
extern int frameGetWindowPrivateIndex(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MFB_PROTOTYPES_ONLY
|
#ifndef MFB_PROTOTYPES_ONLY
|
||||||
/* private field of window */
|
|
||||||
typedef struct {
|
|
||||||
unsigned char fastBorder; /* non-zero if border tile is 32 bits wide */
|
|
||||||
unsigned char fastBackground;
|
|
||||||
unsigned short unused; /* pad for alignment with Sun compiler */
|
|
||||||
DDXPointRec oldRotate;
|
|
||||||
PixmapPtr pRotatedBackground;
|
|
||||||
PixmapPtr pRotatedBorder;
|
|
||||||
} mfbPrivWin;
|
|
||||||
|
|
||||||
/* Common macros for extracting drawing information */
|
/* Common macros for extracting drawing information */
|
||||||
|
|
||||||
#define mfbGetTypedWidth(pDrawable,wtype) (\
|
#define mfbGetTypedWidth(pDrawable,wtype) (\
|
||||||
|
|
126
mfb/mfbpntwin.c
126
mfb/mfbpntwin.c
|
@ -1,126 +0,0 @@
|
||||||
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
|
|
||||||
/***********************************************************
|
|
||||||
|
|
||||||
Copyright 1987, 1998 The Open Group
|
|
||||||
|
|
||||||
Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
the above copyright notice appear in all copies and that both that
|
|
||||||
copyright notice and this permission notice appear in supporting
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
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
|
|
||||||
OPEN GROUP 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 of The Open Group shall not be
|
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
|
||||||
in this Software without prior written authorization from The Open Group.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
||||||
|
|
||||||
All Rights Reserved
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
|
||||||
documentation for any purpose and without fee is hereby granted,
|
|
||||||
provided that the above copyright notice appear in all copies and that
|
|
||||||
both that copyright notice and this permission notice appear in
|
|
||||||
supporting documentation, and that the name of Digital not be
|
|
||||||
used in advertising or publicity pertaining to distribution of the
|
|
||||||
software without specific, written prior permission.
|
|
||||||
|
|
||||||
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
||||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
||||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
||||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
******************************************************************/
|
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
|
||||||
|
|
||||||
#include "windowstr.h"
|
|
||||||
#include "regionstr.h"
|
|
||||||
#include "pixmapstr.h"
|
|
||||||
#include "scrnintstr.h"
|
|
||||||
|
|
||||||
#include "mfb.h"
|
|
||||||
#include "maskbits.h"
|
|
||||||
#include "mi.h"
|
|
||||||
|
|
||||||
void
|
|
||||||
mfbPaintWindow(pWin, pRegion, what)
|
|
||||||
WindowPtr pWin;
|
|
||||||
RegionPtr pRegion;
|
|
||||||
int what;
|
|
||||||
{
|
|
||||||
register mfbPrivWin *pPrivWin;
|
|
||||||
|
|
||||||
pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr);
|
|
||||||
|
|
||||||
switch (what) {
|
|
||||||
case PW_BACKGROUND:
|
|
||||||
switch (pWin->backgroundState) {
|
|
||||||
case None:
|
|
||||||
return;
|
|
||||||
case ParentRelative:
|
|
||||||
do {
|
|
||||||
pWin = pWin->parent;
|
|
||||||
} while (pWin->backgroundState == ParentRelative);
|
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
|
|
||||||
what);
|
|
||||||
return;
|
|
||||||
case BackgroundPixmap:
|
|
||||||
if (pPrivWin->fastBackground)
|
|
||||||
{
|
|
||||||
mfbTileAreaPPWCopy((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXcopy,
|
|
||||||
pPrivWin->pRotatedBackground);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case BackgroundPixel:
|
|
||||||
if (pWin->background.pixel & 1)
|
|
||||||
mfbSolidWhiteArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXset, NullPixmap);
|
|
||||||
else
|
|
||||||
mfbSolidBlackArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXclear, NullPixmap);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PW_BORDER:
|
|
||||||
if (pWin->borderIsPixel)
|
|
||||||
{
|
|
||||||
if (pWin->border.pixel & 1)
|
|
||||||
mfbSolidWhiteArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXset, NullPixmap);
|
|
||||||
else
|
|
||||||
mfbSolidBlackArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXclear, NullPixmap);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (pPrivWin->fastBorder)
|
|
||||||
{
|
|
||||||
mfbTileAreaPPWCopy((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
|
|
||||||
REGION_RECTS(pRegion), GXcopy,
|
|
||||||
pPrivWin->pRotatedBorder);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
miPaintWindow(pWin, pRegion, what);
|
|
||||||
}
|
|
|
@ -71,8 +71,6 @@ SOFTWARE.
|
||||||
int frameWindowPrivateIndex;
|
int frameWindowPrivateIndex;
|
||||||
int frameGetWindowPrivateIndex(void) { return frameWindowPrivateIndex; }
|
int frameGetWindowPrivateIndex(void) { return frameWindowPrivateIndex; }
|
||||||
#endif
|
#endif
|
||||||
int mfbWindowPrivateIndex;
|
|
||||||
int mfbGetWindowPrivateIndex(void) { return mfbWindowPrivateIndex; }
|
|
||||||
int mfbGCPrivateIndex;
|
int mfbGCPrivateIndex;
|
||||||
int mfbGetGCPrivateIndex(void) { return mfbGCPrivateIndex; }
|
int mfbGetGCPrivateIndex(void) { return mfbGCPrivateIndex; }
|
||||||
static unsigned long mfbGeneration = 0;
|
static unsigned long mfbGeneration = 0;
|
||||||
|
@ -90,30 +88,23 @@ static DepthRec depth = {
|
||||||
};
|
};
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
mfbAllocatePrivates(pScreen, pWinIndex, pGCIndex)
|
mfbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex)
|
||||||
ScreenPtr pScreen;
|
|
||||||
int *pWinIndex, *pGCIndex;
|
|
||||||
{
|
{
|
||||||
if (mfbGeneration != serverGeneration)
|
if (mfbGeneration != serverGeneration)
|
||||||
{
|
{
|
||||||
#ifdef PIXMAP_PER_WINDOW
|
#ifdef PIXMAP_PER_WINDOW
|
||||||
frameWindowPrivateIndex = AllocateWindowPrivateIndex();
|
frameWindowPrivateIndex = AllocateWindowPrivateIndex();
|
||||||
#endif
|
#endif
|
||||||
mfbWindowPrivateIndex = AllocateWindowPrivateIndex();
|
|
||||||
mfbGCPrivateIndex = miAllocateGCPrivateIndex();
|
mfbGCPrivateIndex = miAllocateGCPrivateIndex();
|
||||||
visual.vid = FakeClientID(0);
|
visual.vid = FakeClientID(0);
|
||||||
VID = visual.vid;
|
VID = visual.vid;
|
||||||
mfbGeneration = serverGeneration;
|
mfbGeneration = serverGeneration;
|
||||||
}
|
}
|
||||||
if (pWinIndex)
|
|
||||||
*pWinIndex = mfbWindowPrivateIndex;
|
|
||||||
if (pGCIndex)
|
if (pGCIndex)
|
||||||
*pGCIndex = mfbGCPrivateIndex;
|
*pGCIndex = mfbGCPrivateIndex;
|
||||||
pScreen->GetWindowPixmap = mfbGetWindowPixmap;
|
pScreen->GetWindowPixmap = mfbGetWindowPixmap;
|
||||||
pScreen->SetWindowPixmap = mfbSetWindowPixmap;
|
pScreen->SetWindowPixmap = mfbSetWindowPixmap;
|
||||||
return (AllocateWindowPrivate(pScreen, mfbWindowPrivateIndex,
|
return AllocateGCPrivate(pScreen, mfbGCPrivateIndex, sizeof(mfbPrivGC));
|
||||||
sizeof(mfbPrivWin)) &&
|
|
||||||
AllocateGCPrivate(pScreen, mfbGCPrivateIndex, sizeof(mfbPrivGC)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,7 +117,7 @@ mfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
||||||
int dpix, dpiy; /* dots per inch */
|
int dpix, dpiy; /* dots per inch */
|
||||||
int width; /* pixel width of frame buffer */
|
int width; /* pixel width of frame buffer */
|
||||||
{
|
{
|
||||||
if (!mfbAllocatePrivates(pScreen, (int *)NULL, (int *)NULL))
|
if (!mfbAllocatePrivates(pScreen, NULL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
pScreen->defColormap = (Colormap) FakeClientID(0);
|
pScreen->defColormap = (Colormap) FakeClientID(0);
|
||||||
/* whitePixel, blackPixel */
|
/* whitePixel, blackPixel */
|
||||||
|
@ -135,13 +126,9 @@ mfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
||||||
pScreen->GetImage = mfbGetImage;
|
pScreen->GetImage = mfbGetImage;
|
||||||
pScreen->GetSpans = mfbGetSpans;
|
pScreen->GetSpans = mfbGetSpans;
|
||||||
pScreen->CreateWindow = mfbCreateWindow;
|
pScreen->CreateWindow = mfbCreateWindow;
|
||||||
pScreen->DestroyWindow = mfbDestroyWindow;
|
|
||||||
pScreen->PositionWindow = mfbPositionWindow;
|
pScreen->PositionWindow = mfbPositionWindow;
|
||||||
pScreen->ChangeWindowAttributes = mfbChangeWindowAttributes;
|
|
||||||
pScreen->RealizeWindow = mfbMapWindow;
|
pScreen->RealizeWindow = mfbMapWindow;
|
||||||
pScreen->UnrealizeWindow = mfbUnmapWindow;
|
pScreen->UnrealizeWindow = mfbUnmapWindow;
|
||||||
pScreen->PaintWindowBackground = mfbPaintWindow;
|
|
||||||
pScreen->PaintWindowBorder = mfbPaintWindow;
|
|
||||||
pScreen->CopyWindow = mfbCopyWindow;
|
pScreen->CopyWindow = mfbCopyWindow;
|
||||||
pScreen->CreatePixmap = mfbCreatePixmap;
|
pScreen->CreatePixmap = mfbCreatePixmap;
|
||||||
pScreen->DestroyPixmap = mfbDestroyPixmap;
|
pScreen->DestroyPixmap = mfbDestroyPixmap;
|
||||||
|
|
176
mfb/mfbwindow.c
176
mfb/mfbwindow.c
|
@ -64,31 +64,14 @@ Bool
|
||||||
mfbCreateWindow(pWin)
|
mfbCreateWindow(pWin)
|
||||||
register WindowPtr pWin;
|
register WindowPtr pWin;
|
||||||
{
|
{
|
||||||
register mfbPrivWin *pPrivWin;
|
|
||||||
|
|
||||||
pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr);
|
|
||||||
pPrivWin->pRotatedBorder = NullPixmap;
|
|
||||||
pPrivWin->pRotatedBackground = NullPixmap;
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This always returns true, because Xfree can't fail. It might be possible
|
/* This always returns true, because Xfree can't fail. It might be possible
|
||||||
* on some devices for Destroy to fail */
|
* on some devices for Destroy to fail */
|
||||||
Bool
|
Bool
|
||||||
mfbDestroyWindow(pWin)
|
mfbDestroyWindow(WindowPtr pWin)
|
||||||
WindowPtr pWin;
|
|
||||||
{
|
{
|
||||||
register mfbPrivWin *pPrivWin;
|
|
||||||
|
|
||||||
pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr);
|
|
||||||
|
|
||||||
if (pPrivWin->pRotatedBorder)
|
|
||||||
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder);
|
|
||||||
if (pPrivWin->pRotatedBackground)
|
|
||||||
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground);
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,35 +96,6 @@ mfbPositionWindow(pWin, x, y)
|
||||||
register WindowPtr pWin;
|
register WindowPtr pWin;
|
||||||
int x, y;
|
int x, y;
|
||||||
{
|
{
|
||||||
register mfbPrivWin *pPrivWin;
|
|
||||||
int reset = 0;
|
|
||||||
|
|
||||||
pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr);
|
|
||||||
if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground)
|
|
||||||
{
|
|
||||||
mfbXRotatePixmap(pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
mfbYRotatePixmap(pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
reset = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pWin->borderIsPixel && pPrivWin->fastBorder)
|
|
||||||
{
|
|
||||||
while (pWin->backgroundState == ParentRelative)
|
|
||||||
pWin = pWin->parent;
|
|
||||||
mfbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
mfbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
reset = 1;
|
|
||||||
}
|
|
||||||
if (reset)
|
|
||||||
{
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is the "wrong" fix to the right problem, but it doesn't really
|
/* This is the "wrong" fix to the right problem, but it doesn't really
|
||||||
* cost very much. When the window is moved, we need to invalidate any
|
* cost very much. When the window is moved, we need to invalidate any
|
||||||
* RotatedPixmap that exists in any GC currently validated against this
|
* RotatedPixmap that exists in any GC currently validated against this
|
||||||
|
@ -211,131 +165,3 @@ mfbCopyWindow(pWin, ptOldOrg, prgnSrc)
|
||||||
DEALLOCATE_LOCAL(pptSrc);
|
DEALLOCATE_LOCAL(pptSrc);
|
||||||
REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
|
REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* swap in correct PaintWindow* routine. If we can use a fast output
|
|
||||||
routine (i.e. the pixmap is paddable to 32 bits), also pre-rotate a copy
|
|
||||||
of it in devPrivate.
|
|
||||||
*/
|
|
||||||
Bool
|
|
||||||
mfbChangeWindowAttributes(pWin, mask)
|
|
||||||
register WindowPtr pWin;
|
|
||||||
register unsigned long mask;
|
|
||||||
{
|
|
||||||
register unsigned long index;
|
|
||||||
register mfbPrivWin *pPrivWin;
|
|
||||||
WindowPtr pBgWin;
|
|
||||||
|
|
||||||
pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr);
|
|
||||||
/*
|
|
||||||
* When background state changes from ParentRelative and
|
|
||||||
* we had previously rotated the fast border pixmap to match
|
|
||||||
* the parent relative origin, rerotate to match window
|
|
||||||
*/
|
|
||||||
if (mask & (CWBackPixmap | CWBackPixel) &&
|
|
||||||
pWin->backgroundState != ParentRelative &&
|
|
||||||
pPrivWin->fastBorder &&
|
|
||||||
(pPrivWin->oldRotate.x != pWin->drawable.x ||
|
|
||||||
pPrivWin->oldRotate.y != pWin->drawable.y))
|
|
||||||
{
|
|
||||||
mfbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
mfbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
}
|
|
||||||
while(mask)
|
|
||||||
{
|
|
||||||
index = lowbit (mask);
|
|
||||||
mask &= ~index;
|
|
||||||
switch(index)
|
|
||||||
{
|
|
||||||
case CWBackPixmap:
|
|
||||||
if (pWin->backgroundState == None)
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
}
|
|
||||||
else if (pWin->backgroundState == ParentRelative)
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
/* Rotate border to match parent origin */
|
|
||||||
if (pPrivWin->pRotatedBorder) {
|
|
||||||
for (pBgWin = pWin->parent;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
mfbXRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.x - pPrivWin->oldRotate.x);
|
|
||||||
mfbYRotatePixmap(pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.y - pPrivWin->oldRotate.y);
|
|
||||||
pPrivWin->oldRotate.x = pBgWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pBgWin->drawable.y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ((pWin->background.pixmap->drawable.width <= PPW) &&
|
|
||||||
!(pWin->background.pixmap->drawable.width &
|
|
||||||
(pWin->background.pixmap->drawable.width - 1)))
|
|
||||||
{
|
|
||||||
mfbCopyRotatePixmap(pWin->background.pixmap,
|
|
||||||
&pPrivWin->pRotatedBackground,
|
|
||||||
pWin->drawable.x,
|
|
||||||
pWin->drawable.y);
|
|
||||||
if (pPrivWin->pRotatedBackground)
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = TRUE;
|
|
||||||
pPrivWin->oldRotate.x = pWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pWin->drawable.y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CWBackPixel:
|
|
||||||
pPrivWin->fastBackground = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CWBorderPixmap:
|
|
||||||
if ((pWin->border.pixmap->drawable.width <= PPW) &&
|
|
||||||
!(pWin->border.pixmap->drawable.width &
|
|
||||||
(pWin->border.pixmap->drawable.width - 1)))
|
|
||||||
{
|
|
||||||
for (pBgWin = pWin;
|
|
||||||
pBgWin->backgroundState == ParentRelative;
|
|
||||||
pBgWin = pBgWin->parent);
|
|
||||||
mfbCopyRotatePixmap(pWin->border.pixmap,
|
|
||||||
&pPrivWin->pRotatedBorder,
|
|
||||||
pBgWin->drawable.x,
|
|
||||||
pBgWin->drawable.y);
|
|
||||||
if (pPrivWin->pRotatedBorder)
|
|
||||||
{
|
|
||||||
pPrivWin->fastBorder = TRUE;
|
|
||||||
pPrivWin->oldRotate.x = pBgWin->drawable.x;
|
|
||||||
pPrivWin->oldRotate.y = pBgWin->drawable.y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CWBorderPixel:
|
|
||||||
pPrivWin->fastBorder = FALSE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Again, we have no failure modes indicated by any of the routines
|
|
||||||
* we've called, so we have to assume it worked */
|
|
||||||
return (TRUE);
|
|
||||||
}
|
|
||||||
|
|
71
mi/mibank.c
71
mi/mibank.c
|
@ -121,8 +121,6 @@ typedef struct _miBankScreen
|
||||||
GetImageProcPtr GetImage;
|
GetImageProcPtr GetImage;
|
||||||
GetSpansProcPtr GetSpans;
|
GetSpansProcPtr GetSpans;
|
||||||
CreateGCProcPtr CreateGC;
|
CreateGCProcPtr CreateGC;
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
} miBankScreenRec, *miBankScreenPtr;
|
} miBankScreenRec, *miBankScreenPtr;
|
||||||
|
|
||||||
|
@ -1712,8 +1710,6 @@ miBankCloseScreen(
|
||||||
SCREEN_UNWRAP(GetImage);
|
SCREEN_UNWRAP(GetImage);
|
||||||
SCREEN_UNWRAP(GetSpans);
|
SCREEN_UNWRAP(GetSpans);
|
||||||
SCREEN_UNWRAP(CreateGC);
|
SCREEN_UNWRAP(CreateGC);
|
||||||
SCREEN_UNWRAP(PaintWindowBackground);
|
|
||||||
SCREEN_UNWRAP(PaintWindowBorder);
|
|
||||||
SCREEN_UNWRAP(CopyWindow);
|
SCREEN_UNWRAP(CopyWindow);
|
||||||
|
|
||||||
Xfree(pScreenPriv);
|
Xfree(pScreenPriv);
|
||||||
|
@ -1877,71 +1873,6 @@ miBankCreateGC(
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
miBankPaintWindow(
|
|
||||||
WindowPtr pWin,
|
|
||||||
RegionPtr pRegion,
|
|
||||||
int what
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
RegionRec tmpReg;
|
|
||||||
int i;
|
|
||||||
PaintWindowProcPtr PaintWindow;
|
|
||||||
|
|
||||||
SCREEN_INIT;
|
|
||||||
SCREEN_SAVE;
|
|
||||||
|
|
||||||
if (what == PW_BORDER)
|
|
||||||
{
|
|
||||||
SCREEN_UNWRAP(PaintWindowBorder);
|
|
||||||
PaintWindow = pScreen->PaintWindowBorder;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SCREEN_UNWRAP(PaintWindowBackground);
|
|
||||||
PaintWindow = pScreen->PaintWindowBackground;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!IS_BANKED(pWin))
|
|
||||||
{
|
|
||||||
(*PaintWindow)(pWin, pRegion, what);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
REGION_NULL(pScreen, &tmpReg);
|
|
||||||
|
|
||||||
for (i = 0; i < pScreenPriv->nBanks; i++)
|
|
||||||
{
|
|
||||||
if (!pScreenPriv->pBanks[i])
|
|
||||||
continue;
|
|
||||||
|
|
||||||
REGION_INTERSECT(pScreen, &tmpReg, pRegion,
|
|
||||||
pScreenPriv->pBanks[i]);
|
|
||||||
|
|
||||||
if (REGION_NIL(&tmpReg))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i);
|
|
||||||
|
|
||||||
(*PaintWindow)(pWin, &tmpReg, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
REGION_UNINIT(pScreen, &tmpReg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (what == PW_BORDER)
|
|
||||||
{
|
|
||||||
SCREEN_WRAP(PaintWindowBorder, miBankPaintWindow);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SCREEN_WRAP(PaintWindowBackground, miBankPaintWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
SCREEN_RESTORE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
miBankCopyWindow(
|
miBankCopyWindow(
|
||||||
WindowPtr pWindow,
|
WindowPtr pWindow,
|
||||||
|
@ -2269,8 +2200,6 @@ miInitializeBanking(
|
||||||
SCREEN_WRAP(GetImage, miBankGetImage);
|
SCREEN_WRAP(GetImage, miBankGetImage);
|
||||||
SCREEN_WRAP(GetSpans, miBankGetSpans);
|
SCREEN_WRAP(GetSpans, miBankGetSpans);
|
||||||
SCREEN_WRAP(CreateGC, miBankCreateGC);
|
SCREEN_WRAP(CreateGC, miBankCreateGC);
|
||||||
SCREEN_WRAP(PaintWindowBackground, miBankPaintWindow);
|
|
||||||
SCREEN_WRAP(PaintWindowBorder, miBankPaintWindow);
|
|
||||||
SCREEN_WRAP(CopyWindow, miBankCopyWindow);
|
SCREEN_WRAP(CopyWindow, miBankCopyWindow);
|
||||||
|
|
||||||
BANK_SCRPRIVLVAL = (pointer)pScreenPriv;
|
BANK_SCRPRIVLVAL = (pointer)pScreenPriv;
|
||||||
|
|
|
@ -307,8 +307,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
|
||||||
/* PaintWindowBackground doesn't clip, so we have to */
|
/* PaintWindowBackground doesn't clip, so we have to */
|
||||||
REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, &pWin->clipList);
|
REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, &pWin->clipList);
|
||||||
}
|
}
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(
|
miPaintWindow((WindowPtr)pDstDrawable, &rgnExposed, PW_BACKGROUND);
|
||||||
(WindowPtr)pDstDrawable, &rgnExposed, PW_BACKGROUND);
|
|
||||||
|
|
||||||
if (extents)
|
if (extents)
|
||||||
{
|
{
|
||||||
|
@ -517,7 +516,7 @@ miWindowExposures(pWin, prgn, other_exposed)
|
||||||
REGION_INTERSECT( pWin->drawable.pScreen, prgn, prgn, &pWin->clipList);
|
REGION_INTERSECT( pWin->drawable.pScreen, prgn, prgn, &pWin->clipList);
|
||||||
}
|
}
|
||||||
if (prgn && !REGION_NIL(prgn))
|
if (prgn && !REGION_NIL(prgn))
|
||||||
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, PW_BACKGROUND);
|
miPaintWindow(pWin, prgn, PW_BACKGROUND);
|
||||||
if (clientInterested && exposures && !REGION_NIL(exposures))
|
if (clientInterested && exposures && !REGION_NIL(exposures))
|
||||||
miSendExposures(pWin, exposures,
|
miSendExposures(pWin, exposures,
|
||||||
pWin->drawable.x, pWin->drawable.y);
|
pWin->drawable.x, pWin->drawable.y);
|
||||||
|
@ -534,60 +533,13 @@ miWindowExposures(pWin, prgn, other_exposed)
|
||||||
REGION_DESTROY( pWin->drawable.pScreen, exposures);
|
REGION_DESTROY( pWin->drawable.pScreen, exposures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
this code is highly unlikely. it is not haile selassie.
|
|
||||||
|
|
||||||
there is some hair here. we can't just use the window's
|
|
||||||
clip region as it is, because if we are painting the border,
|
|
||||||
the border is not in the client area and so we will be excluded
|
|
||||||
when we validate the GC, and if we are painting a parent-relative
|
|
||||||
background, the area we want to paint is in some other window.
|
|
||||||
since we trust the code calling us to tell us to paint only areas
|
|
||||||
that are really ours, we will temporarily give the window a
|
|
||||||
clipList the size of the whole screen and an origin at (0,0).
|
|
||||||
this more or less assumes that ddX code will do translation
|
|
||||||
based on the window's absolute position, and that ValidateGC will
|
|
||||||
look at clipList, and that no other fields from the
|
|
||||||
window will be used. it's not possible to just draw
|
|
||||||
in the root because it may be a different depth.
|
|
||||||
|
|
||||||
to get the tile to align correctly we set the GC's tile origin to
|
|
||||||
be the (x,y) of the window's upper left corner, after which we
|
|
||||||
get the right bits when drawing into the root.
|
|
||||||
|
|
||||||
because the clip_mask is being set to None, we may call DoChangeGC with
|
|
||||||
fPointer set true, thus we no longer need to install the background or
|
|
||||||
border tile in the resource table.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static RESTYPE ResType = 0;
|
|
||||||
static int numGCs = 0;
|
|
||||||
static GCPtr screenContext[MAXSCREENS];
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
static int
|
|
||||||
tossGC (
|
|
||||||
pointer value,
|
|
||||||
XID id)
|
|
||||||
{
|
|
||||||
GCPtr pGC = (GCPtr)value;
|
|
||||||
screenContext[pGC->pScreen->myNum] = (GCPtr)NULL;
|
|
||||||
FreeGC (pGC, id);
|
|
||||||
numGCs--;
|
|
||||||
if (!numGCs)
|
|
||||||
ResType = 0;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
|
miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
ChangeGCVal gcval[5];
|
ChangeGCVal gcval[5];
|
||||||
BITS32 gcmask;
|
BITS32 gcmask;
|
||||||
PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
int i;
|
int i;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
|
@ -595,8 +547,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
|
||||||
int numRects;
|
int numRects;
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
|
|
||||||
while (pWin->backgroundState == ParentRelative)
|
pPixmap = (*pScreen->GetWindowPixmap) (pWin);
|
||||||
pWin = pWin->parent;
|
|
||||||
|
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
xoff = -pPixmap->screen_x;
|
xoff = -pPixmap->screen_x;
|
||||||
|
@ -610,6 +561,9 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
|
||||||
|
|
||||||
if (what == PW_BACKGROUND)
|
if (what == PW_BACKGROUND)
|
||||||
{
|
{
|
||||||
|
while (pWin->backgroundState == ParentRelative)
|
||||||
|
pWin = pWin->parent;
|
||||||
|
|
||||||
switch (pWin->backgroundState) {
|
switch (pWin->backgroundState) {
|
||||||
case None:
|
case None:
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -865,9 +865,10 @@ miOverlayHandleExposures(WindowPtr pWin)
|
||||||
while (1) {
|
while (1) {
|
||||||
if((mival = pTree->valdata)) {
|
if((mival = pTree->valdata)) {
|
||||||
if(!((*pPriv->InOverlay)(pTree->pWin))) {
|
if(!((*pPriv->InOverlay)(pTree->pWin))) {
|
||||||
if (REGION_NOTEMPTY(pScreen, &mival->borderExposed))
|
if (REGION_NOTEMPTY(pScreen, &mival->borderExposed)) {
|
||||||
(*pWin->drawable.pScreen->PaintWindowBorder)(
|
miPaintWindow(pTree->pWin, &mival->borderExposed,
|
||||||
pTree->pWin, &mival->borderExposed, PW_BORDER);
|
PW_BORDER);
|
||||||
|
}
|
||||||
REGION_UNINIT(pScreen, &mival->borderExposed);
|
REGION_UNINIT(pScreen, &mival->borderExposed);
|
||||||
|
|
||||||
(*WindowExposures)(pTree->pWin,&mival->exposed,NullRegion);
|
(*WindowExposures)(pTree->pWin,&mival->exposed,NullRegion);
|
||||||
|
@ -903,10 +904,10 @@ miOverlayHandleExposures(WindowPtr pWin)
|
||||||
REGION_RECTS(&val->after.exposed));
|
REGION_RECTS(&val->after.exposed));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed))
|
if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed)) {
|
||||||
(*pChild->drawable.pScreen->PaintWindowBorder)(pChild,
|
miPaintWindow(pChild, &val->after.borderExposed,
|
||||||
&val->after.borderExposed,
|
|
||||||
PW_BORDER);
|
PW_BORDER);
|
||||||
|
}
|
||||||
(*WindowExposures)(pChild, &val->after.exposed, NullRegion);
|
(*WindowExposures)(pChild, &val->after.exposed, NullRegion);
|
||||||
}
|
}
|
||||||
REGION_UNINIT(pScreen, &val->after.borderExposed);
|
REGION_UNINIT(pScreen, &val->after.borderExposed);
|
||||||
|
@ -1066,8 +1067,7 @@ miOverlayWindowExposures(
|
||||||
REGION_INTERSECT(pScreen, prgn, prgn, &pWin->clipList);
|
REGION_INTERSECT(pScreen, prgn, prgn, &pWin->clipList);
|
||||||
}
|
}
|
||||||
if (prgn && !REGION_NIL(prgn))
|
if (prgn && !REGION_NIL(prgn))
|
||||||
(*pScreen->PaintWindowBackground)(
|
miPaintWindow(pWin, prgn, PW_BACKGROUND);
|
||||||
pWin, prgn, PW_BACKGROUND);
|
|
||||||
if (clientInterested && exposures && !REGION_NIL(exposures))
|
if (clientInterested && exposures && !REGION_NIL(exposures))
|
||||||
miSendExposures(pWin, exposures,
|
miSendExposures(pWin, exposures,
|
||||||
pWin->drawable.x, pWin->drawable.y);
|
pWin->drawable.x, pWin->drawable.y);
|
||||||
|
@ -1738,7 +1738,7 @@ miOverlayClearToBackground(
|
||||||
if (generateExposures)
|
if (generateExposures)
|
||||||
(*pScreen->WindowExposures)(pWin, ®, pBSReg);
|
(*pScreen->WindowExposures)(pWin, ®, pBSReg);
|
||||||
else if (pWin->backgroundState != None)
|
else if (pWin->backgroundState != None)
|
||||||
(*pScreen->PaintWindowBackground)(pWin, ®, PW_BACKGROUND);
|
miPaintWindow(pWin, ®, PW_BACKGROUND);
|
||||||
REGION_UNINIT(pScreen, ®);
|
REGION_UNINIT(pScreen, ®);
|
||||||
if (pBSReg)
|
if (pBSReg)
|
||||||
REGION_DESTROY(pScreen, pBSReg);
|
REGION_DESTROY(pScreen, pBSReg);
|
||||||
|
|
|
@ -251,7 +251,7 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
|
||||||
pScreen->ValidateTree = miValidateTree;
|
pScreen->ValidateTree = miValidateTree;
|
||||||
pScreen->PostValidateTree = (PostValidateTreeProcPtr) 0;
|
pScreen->PostValidateTree = (PostValidateTreeProcPtr) 0;
|
||||||
pScreen->WindowExposures = miWindowExposures;
|
pScreen->WindowExposures = miWindowExposures;
|
||||||
/* PaintWindowBackground, PaintWindowBorder, CopyWindow */
|
/* CopyWindow */
|
||||||
pScreen->ClearToBackground = miClearToBackground;
|
pScreen->ClearToBackground = miClearToBackground;
|
||||||
pScreen->ClipNotify = (ClipNotifyProcPtr) 0;
|
pScreen->ClipNotify = (ClipNotifyProcPtr) 0;
|
||||||
pScreen->RestackWindow = (RestackWindowProcPtr) 0;
|
pScreen->RestackWindow = (RestackWindowProcPtr) 0;
|
||||||
|
|
|
@ -118,7 +118,7 @@ miClearToBackground(pWin, x, y, w, h, generateExposures)
|
||||||
if (generateExposures)
|
if (generateExposures)
|
||||||
(*pScreen->WindowExposures)(pWin, ®, pBSReg);
|
(*pScreen->WindowExposures)(pWin, ®, pBSReg);
|
||||||
else if (pWin->backgroundState != None)
|
else if (pWin->backgroundState != None)
|
||||||
(*pScreen->PaintWindowBackground)(pWin, ®, PW_BACKGROUND);
|
miPaintWindow(pWin, ®, PW_BACKGROUND);
|
||||||
REGION_UNINIT(pScreen, ®);
|
REGION_UNINIT(pScreen, ®);
|
||||||
if (pBSReg)
|
if (pBSReg)
|
||||||
REGION_DESTROY(pScreen, pBSReg);
|
REGION_DESTROY(pScreen, pBSReg);
|
||||||
|
@ -451,9 +451,7 @@ miHandleValidateExposures(pWin)
|
||||||
if ( (val = pChild->valdata) )
|
if ( (val = pChild->valdata) )
|
||||||
{
|
{
|
||||||
if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed))
|
if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed))
|
||||||
(*pChild->drawable.pScreen->PaintWindowBorder)(pChild,
|
miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
|
||||||
&val->after.borderExposed,
|
|
||||||
PW_BORDER);
|
|
||||||
REGION_UNINIT(pScreen, &val->after.borderExposed);
|
REGION_UNINIT(pScreen, &val->after.borderExposed);
|
||||||
(*WindowExposures)(pChild, &val->after.exposed, NullRegion);
|
(*WindowExposures)(pChild, &val->after.exposed, NullRegion);
|
||||||
REGION_UNINIT(pScreen, &val->after.exposed);
|
REGION_UNINIT(pScreen, &val->after.exposed);
|
||||||
|
|
147
miext/cw/cw.c
147
miext/cw/cw.c
|
@ -380,149 +380,6 @@ cwGetSpans(DrawablePtr pSrc, int wMax, DDXPointPtr ppt, int *pwidth,
|
||||||
SCREEN_EPILOGUE(pScreen, GetSpans, cwGetSpans);
|
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
|
static void
|
||||||
cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
|
@ -654,8 +511,6 @@ miInitializeCompositeWrapper(ScreenPtr pScreen)
|
||||||
SCREEN_EPILOGUE(pScreen, GetImage, cwGetImage);
|
SCREEN_EPILOGUE(pScreen, GetImage, cwGetImage);
|
||||||
SCREEN_EPILOGUE(pScreen, GetSpans, cwGetSpans);
|
SCREEN_EPILOGUE(pScreen, GetSpans, cwGetSpans);
|
||||||
SCREEN_EPILOGUE(pScreen, CreateGC, cwCreateGC);
|
SCREEN_EPILOGUE(pScreen, CreateGC, cwCreateGC);
|
||||||
SCREEN_EPILOGUE(pScreen, PaintWindowBackground, cwPaintWindowBackground);
|
|
||||||
SCREEN_EPILOGUE(pScreen, PaintWindowBorder, cwPaintWindowBorder);
|
|
||||||
SCREEN_EPILOGUE(pScreen, CopyWindow, cwCopyWindow);
|
SCREEN_EPILOGUE(pScreen, CopyWindow, cwCopyWindow);
|
||||||
|
|
||||||
SCREEN_EPILOGUE(pScreen, SetWindowPixmap, cwSetWindowPixmap);
|
SCREEN_EPILOGUE(pScreen, SetWindowPixmap, cwSetWindowPixmap);
|
||||||
|
@ -681,8 +536,6 @@ cwCloseScreen (int i, ScreenPtr pScreen)
|
||||||
pScreen->GetImage = pScreenPriv->GetImage;
|
pScreen->GetImage = pScreenPriv->GetImage;
|
||||||
pScreen->GetSpans = pScreenPriv->GetSpans;
|
pScreen->GetSpans = pScreenPriv->GetSpans;
|
||||||
pScreen->CreateGC = pScreenPriv->CreateGC;
|
pScreen->CreateGC = pScreenPriv->CreateGC;
|
||||||
pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
|
|
||||||
pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
|
|
||||||
pScreen->CopyWindow = pScreenPriv->CopyWindow;
|
pScreen->CopyWindow = pScreenPriv->CopyWindow;
|
||||||
|
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
|
|
|
@ -84,8 +84,6 @@ typedef struct {
|
||||||
GetSpansProcPtr GetSpans;
|
GetSpansProcPtr GetSpans;
|
||||||
CreateGCProcPtr CreateGC;
|
CreateGCProcPtr CreateGC;
|
||||||
|
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
|
|
||||||
GetWindowPixmapProcPtr GetWindowPixmap;
|
GetWindowPixmapProcPtr GetWindowPixmap;
|
||||||
|
|
|
@ -1634,35 +1634,6 @@ damageDestroyPixmap (PixmapPtr pPixmap)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
static void
|
||||||
damageCopyWindow(WindowPtr pWindow,
|
damageCopyWindow(WindowPtr pWindow,
|
||||||
DDXPointRec ptOldOrg,
|
DDXPointRec ptOldOrg,
|
||||||
|
@ -1763,8 +1734,6 @@ damageCloseScreen (int i, ScreenPtr pScreen)
|
||||||
|
|
||||||
unwrap (pScrPriv, pScreen, DestroyPixmap);
|
unwrap (pScrPriv, pScreen, DestroyPixmap);
|
||||||
unwrap (pScrPriv, pScreen, CreateGC);
|
unwrap (pScrPriv, pScreen, CreateGC);
|
||||||
unwrap (pScrPriv, pScreen, PaintWindowBackground);
|
|
||||||
unwrap (pScrPriv, pScreen, PaintWindowBorder);
|
|
||||||
unwrap (pScrPriv, pScreen, CopyWindow);
|
unwrap (pScrPriv, pScreen, CopyWindow);
|
||||||
unwrap (pScrPriv, pScreen, CloseScreen);
|
unwrap (pScrPriv, pScreen, CloseScreen);
|
||||||
xfree (pScrPriv);
|
xfree (pScrPriv);
|
||||||
|
@ -1814,8 +1783,6 @@ DamageSetup (ScreenPtr pScreen)
|
||||||
|
|
||||||
wrap (pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap);
|
wrap (pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap);
|
||||||
wrap (pScrPriv, pScreen, CreateGC, damageCreateGC);
|
wrap (pScrPriv, pScreen, CreateGC, damageCreateGC);
|
||||||
wrap (pScrPriv, pScreen, PaintWindowBackground, damagePaintWindow);
|
|
||||||
wrap (pScrPriv, pScreen, PaintWindowBorder, damagePaintWindow);
|
|
||||||
wrap (pScrPriv, pScreen, DestroyWindow, damageDestroyWindow);
|
wrap (pScrPriv, pScreen, DestroyWindow, damageDestroyWindow);
|
||||||
wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap);
|
wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap);
|
||||||
wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow);
|
wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow);
|
||||||
|
|
|
@ -60,8 +60,6 @@ typedef struct _damageScrPriv {
|
||||||
*/
|
*/
|
||||||
DamagePtr pScreenDamage;
|
DamagePtr pScreenDamage;
|
||||||
|
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
CopyWindowProcPtr CopyWindow;
|
||||||
CloseScreenProcPtr CloseScreen;
|
CloseScreenProcPtr CloseScreen;
|
||||||
CreateGCProcPtr CreateGC;
|
CreateGCProcPtr CreateGC;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue