Merge branch 'master' into XACE-SELINUX
Conflicts: afb/afbpntwin.c afb/afbscrinit.c afb/afbwindow.c cfb/cfb.h cfb/cfballpriv.c cfb/cfbscrinit.c cfb/cfbwindow.c configure.ac fb/wfbrename.h hw/xfree86/xf4bpp/ppcIO.c hw/xfree86/xf4bpp/ppcPntWin.c hw/xfree86/xf4bpp/ppcWindow.c hw/xfree86/xf8_32bpp/cfbscrinit.c mfb/mfb.h mfb/mfbpntwin.c mfb/mfbscrinit.c mfb/mfbwindow.c mi/miexpose.c Note: conflicts caused by devPrivates rework vs. paintwindow changes.
This commit is contained in:
commit
97c150b61b
30
.gitignore
vendored
30
.gitignore
vendored
|
@ -16,6 +16,7 @@ config.log
|
|||
config.status
|
||||
config.sub
|
||||
configure
|
||||
configure.lineno
|
||||
depcomp
|
||||
install-sh
|
||||
libtool
|
||||
|
@ -91,6 +92,8 @@ cfb32/cfbzerarcG.c
|
|||
cfb32/cfbzerarcX.c
|
||||
doc/Xserver.1x
|
||||
doc/Xserver.man
|
||||
doc/SecurityPolicy.5
|
||||
doc/SecurityPolicy.man
|
||||
hw/dmx/Xdmx
|
||||
hw/dmx/Xdmx.1x
|
||||
hw/dmx/config/dmxtodmx
|
||||
|
@ -206,31 +209,58 @@ hw/xfree86/xaa/mf3-xaaBitmap.c
|
|||
hw/xfree86/xaa/mf3-xaaStipple.c
|
||||
hw/xfree86/xaa/s-xaaDashLine.c
|
||||
hw/xfree86/xaa/s-xaaLine.c
|
||||
hw/xfree86/xf1bpp/maskbits.c
|
||||
hw/xfree86/xf1bpp/mfbbitblt.c
|
||||
hw/xfree86/xf1bpp/mfbbltC.c
|
||||
hw/xfree86/xf1bpp/mfbbltCI.c
|
||||
hw/xfree86/xf1bpp/mfbbltG.c
|
||||
hw/xfree86/xf1bpp/mfbbltO.c
|
||||
hw/xfree86/xf1bpp/mfbbltX.c
|
||||
hw/xfree86/xf1bpp/mfbbres.c
|
||||
hw/xfree86/xf1bpp/mfbbresd.c
|
||||
hw/xfree86/xf1bpp/mfbclip.c
|
||||
hw/xfree86/xf1bpp/mfbcmap.c
|
||||
hw/xfree86/xf1bpp/mfbfillarc.c
|
||||
hw/xfree86/xf1bpp/mfbfillrct.c
|
||||
hw/xfree86/xf1bpp/mfbfillsp.c
|
||||
hw/xfree86/xf1bpp/mfbfont.c
|
||||
hw/xfree86/xf1bpp/mfbgc.c
|
||||
hw/xfree86/xf1bpp/mfbgetsp.c
|
||||
hw/xfree86/xf1bpp/mfbigbblak.c
|
||||
hw/xfree86/xf1bpp/mfbigbwht.c
|
||||
hw/xfree86/xf1bpp/mfbhrzvert.c
|
||||
hw/xfree86/xf1bpp/mfbimage.c
|
||||
hw/xfree86/xf1bpp/mfbline.c
|
||||
hw/xfree86/xf1bpp/mfbmisc.c
|
||||
hw/xfree86/xf1bpp/mfbpablack.c
|
||||
hw/xfree86/xf1bpp/mfbpainv.c
|
||||
hw/xfree86/xf1bpp/mfbpawhite.c
|
||||
hw/xfree86/xf1bpp/mfbpgbblak.c
|
||||
hw/xfree86/xf1bpp/mfbpgbinv.c
|
||||
hw/xfree86/xf1bpp/mfbpgbwht.c
|
||||
hw/xfree86/xf1bpp/mfbpixmap.c
|
||||
hw/xfree86/xf1bpp/mfbplyblack.c
|
||||
hw/xfree86/xf1bpp/mfbplyinv.c
|
||||
hw/xfree86/xf1bpp/mfbplywhite.c
|
||||
hw/xfree86/xf1bpp/mfbpntwin.c
|
||||
hw/xfree86/xf1bpp/mfbpolypnt.c
|
||||
hw/xfree86/xf1bpp/mfbpushpxl.c
|
||||
hw/xfree86/xf1bpp/mfbscrclse.c
|
||||
hw/xfree86/xf1bpp/mfbscrinit.c
|
||||
hw/xfree86/xf1bpp/mfbseg.c
|
||||
hw/xfree86/xf1bpp/mfbsetsp.c
|
||||
hw/xfree86/xf1bpp/mfbteblack.c
|
||||
hw/xfree86/xf1bpp/mfbtewhite.c
|
||||
hw/xfree86/xf1bpp/mfbtileC.c
|
||||
hw/xfree86/xf1bpp/mfbtileG.c
|
||||
hw/xfree86/xf1bpp/mfbwindow.c
|
||||
hw/xfree86/xf1bpp/mfbzerarc.c
|
||||
hw/xfree86/xf4bpp/mfbseg.c
|
||||
hw/xfree86/xf8_32bpp/cfbgc32.c
|
||||
hw/xfree86/xf8_32bpp/cfbgc8.c
|
||||
hw/xfree86/xorg.c
|
||||
hw/xfree86/xorg.conf.example
|
||||
hw/xfree86/xorg.conf.example.pre
|
||||
hw/xnest/Xnest
|
||||
hw/xnest/Xnest.1x
|
||||
hw/xnest/Xnest.man
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
# someone could get really crazy someday and add support for the SI...
|
||||
|
||||
# xwin/darwin/xfree86 have their accel support under the DDX
|
||||
|
||||
if BUILD_DARWIN
|
||||
if XDARWIN
|
||||
DARWIN_SUBDIRS = apple
|
||||
endif
|
||||
SUBDIRS = glx mesa $(DARWIN_SUBDIRS)
|
||||
|
|
|
@ -97,7 +97,7 @@ endif
|
|||
XCALIBRATE_SRCS = xcalibrate.c
|
||||
if XCALIBRATE
|
||||
BUILTIN_SRCS += $(XCALIBRATE_SRCS)
|
||||
# XCalibrare needs tslib
|
||||
# XCalibrate needs tslib
|
||||
endif
|
||||
|
||||
# X EVent Interception Extension: allows accessibility helpers & composite
|
||||
|
|
|
@ -504,7 +504,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
|
|||
|
||||
REGION_INTERSECT(pScreen, ®, ®, &pBuffer->clipList);
|
||||
if (pBuffer->backgroundState != None)
|
||||
(*pScreen->PaintWindowBackground)(pBuffer, ®, PW_BACKGROUND);
|
||||
miPaintWindow(pBuffer, ®, PW_BACKGROUND);
|
||||
if (generateExposures)
|
||||
MultibufferExpose(pMBBuffer, ®);
|
||||
#ifdef _notdef
|
||||
|
@ -517,7 +517,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
|
|||
if (generateExposures)
|
||||
(*pScreen->WindowExposures)(pBuffer, ®, pBSReg);
|
||||
else if (pBuffer->backgroundState != None)
|
||||
(*pScreen->PaintWindowBackground)(pBuffer, ®, PW_BACKGROUND);
|
||||
miPaintWindow(pBuffer, ®, PW_BACKGROUND);
|
||||
#endif
|
||||
REGION_UNINIT(pScreen, ®);
|
||||
if (pBSReg)
|
||||
|
@ -836,8 +836,7 @@ bufClipNotify(pWin, dx,dy)
|
|||
|
||||
/*
|
||||
* Updates buffer's background fields when the window's changes.
|
||||
* This is necessary because pScreen->PaintWindowBackground
|
||||
* is used to paint the buffer.
|
||||
* This is necessary because miPaintWindow is used to paint the buffer.
|
||||
*
|
||||
* 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;
|
||||
|
||||
if (i != pMBWindow->displayedMultibuffer)
|
||||
(* pScreen->PaintWindowBackground)(pBuffer,&tmp_rgn,PW_BACKGROUND);
|
||||
miPaintWindow(pBuffer, &tmp_rgn, PW_BACKGROUND);
|
||||
if ((pMBBuffer->otherEventMask | pMBBuffer->eventMask) & ExposureMask)
|
||||
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)
|
||||
|
||||
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 \
|
||||
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 \
|
||||
|
|
15
afb/afb.h
15
afb/afb.h
|
@ -506,11 +506,6 @@ extern void afbCopyRotatePixmap(
|
|||
int /*xrot*/,
|
||||
int /*yrot*/
|
||||
);
|
||||
extern void afbPaintWindow(
|
||||
WindowPtr /*pWin*/,
|
||||
RegionPtr /*pRegion*/,
|
||||
int /*what*/
|
||||
);
|
||||
/* afbpolypnt.c */
|
||||
|
||||
extern void afbPolyPoint(
|
||||
|
@ -745,16 +740,6 @@ extern DevPrivateKey frameWindowPrivateKey;
|
|||
#define afbGetGCPrivate(pGC) \
|
||||
((afbPrivGC *)dixLookupPrivate(&(pGC)->devPrivates, afbGCPrivateKey))
|
||||
|
||||
/* 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 */
|
||||
|
||||
#define afbGetTypedWidth(pDrawable,wtype)( \
|
||||
|
|
128
afb/afbpntwin.c
128
afb/afbpntwin.c
|
@ -1,128 +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 "privates.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 *)dixLookupPrivate(&pWin->devPrivates,
|
||||
afbWindowPrivateKey);
|
||||
|
||||
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
|
||||
DevPrivateKey frameWindowPrivateKey = &frameWindowPrivateKey;
|
||||
#endif
|
||||
DevPrivateKey afbWindowPrivateKey = &afbWindowPrivateKey;
|
||||
DevPrivateKey afbGCPrivateKey = &afbGCPrivateKey;
|
||||
DevPrivateKey afbScreenPrivateKey = &afbScreenPrivateKey;
|
||||
|
||||
|
@ -135,18 +134,14 @@ afbSetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
|
|||
}
|
||||
|
||||
static Bool
|
||||
afbAllocatePrivates(ScreenPtr pScreen,
|
||||
DevPrivateKey *pWinKey, DevPrivateKey *pGCKey)
|
||||
afbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey)
|
||||
{
|
||||
if (pWinKey)
|
||||
*pWinKey = afbWindowPrivateKey;
|
||||
if (pGCKey)
|
||||
*pGCKey = afbGCPrivateKey;
|
||||
|
||||
pScreen->GetWindowPixmap = afbGetWindowPixmap;
|
||||
pScreen->SetWindowPixmap = afbSetWindowPixmap;
|
||||
return(dixRequestPrivate(afbWindowPrivateKey, sizeof(afbPrivWin)) &&
|
||||
dixRequestPrivate(afbGCPrivateKey, sizeof(afbPrivGC)));
|
||||
return dixRequestPrivate(afbGCPrivateKey, sizeof(afbPrivGC));
|
||||
}
|
||||
|
||||
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
|
||||
|
@ -172,7 +167,7 @@ afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, i
|
|||
ErrorF("afbInitVisuals: FALSE\n");
|
||||
return FALSE;
|
||||
}
|
||||
if (!afbAllocatePrivates(pScreen, NULL, NULL)) {
|
||||
if (!afbAllocatePrivates(pScreen, NULL)) {
|
||||
ErrorF("afbAllocatePrivates: FALSE\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -191,8 +186,6 @@ afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, i
|
|||
pScreen->ChangeWindowAttributes = afbChangeWindowAttributes;
|
||||
pScreen->RealizeWindow = afbMapWindow;
|
||||
pScreen->UnrealizeWindow = afbUnmapWindow;
|
||||
pScreen->PaintWindowBackground = afbPaintWindow;
|
||||
pScreen->PaintWindowBorder = afbPaintWindow;
|
||||
pScreen->CopyWindow = afbCopyWindow;
|
||||
pScreen->CreatePixmap = afbCreatePixmap;
|
||||
pScreen->DestroyPixmap = afbDestroyPixmap;
|
||||
|
|
167
afb/afbwindow.c
167
afb/afbwindow.c
|
@ -63,41 +63,16 @@ SOFTWARE.
|
|||
#include "maskbits.h"
|
||||
|
||||
Bool
|
||||
afbCreateWindow(pWin)
|
||||
register WindowPtr pWin;
|
||||
afbCreateWindow(WindowPtr pWin)
|
||||
{
|
||||
register afbPrivWin *pPrivWin;
|
||||
|
||||
pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates,
|
||||
afbWindowPrivateKey);
|
||||
pPrivWin->pRotatedBorder = NullPixmap;
|
||||
pPrivWin->pRotatedBackground = NullPixmap;
|
||||
pPrivWin->fastBackground = FALSE;
|
||||
pPrivWin->fastBorder = FALSE;
|
||||
#ifdef PIXMAP_PER_WINDOW
|
||||
dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey,
|
||||
dixLookupPrivate(&pWin->pDrawable.pScreen->devPrivates,
|
||||
afbScreenPrivateKey));
|
||||
#endif
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
/* This always returns true, because Xfree can't fail. It might be possible
|
||||
* on some devices for Destroy to fail */
|
||||
Bool
|
||||
afbDestroyWindow(pWin)
|
||||
WindowPtr pWin;
|
||||
afbDestroyWindow(WindowPtr pWin)
|
||||
{
|
||||
register afbPrivWin *pPrivWin;
|
||||
|
||||
pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates,
|
||||
afbWindowPrivateKey);
|
||||
if (pPrivWin->pRotatedBorder)
|
||||
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder);
|
||||
if (pPrivWin->pRotatedBackground)
|
||||
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
@ -109,47 +84,10 @@ afbMapWindow(pWindow)
|
|||
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*/
|
||||
Bool
|
||||
afbPositionWindow(pWin, x, y)
|
||||
WindowPtr pWin;
|
||||
int x, y;
|
||||
afbPositionWindow(WindowPtr pWin, int x, int y)
|
||||
{
|
||||
register afbPrivWin *pPrivWin;
|
||||
int reset = 0;
|
||||
|
||||
pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates,
|
||||
afbWindowPrivateKey);
|
||||
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
|
||||
* cost very much. When the window is moved, we need to invalidate any
|
||||
* RotatedPixmap that exists in any GC currently validated against this
|
||||
|
@ -219,105 +157,8 @@ afbCopyWindow(pWin, ptOldOrg, prgnSrc)
|
|||
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
|
||||
afbChangeWindowAttributes(pWin, mask)
|
||||
register WindowPtr pWin;
|
||||
register unsigned long mask;
|
||||
afbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
||||
{
|
||||
register unsigned long index;
|
||||
register afbPrivWin *pPrivWin;
|
||||
WindowPtr pBgWin;
|
||||
|
||||
pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates,
|
||||
afbWindowPrivateKey);
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ DISTCLEANFILES = $(libcfb_gen_sources)
|
|||
CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
|
||||
|
||||
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/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \
|
||||
$(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \
|
||||
|
|
39
cfb/cfb.h
39
cfb/cfb.h
|
@ -57,7 +57,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
*/
|
||||
|
||||
extern DevPrivateKey cfbGCPrivateKey;
|
||||
extern DevPrivateKey cfbWindowPrivateKey;
|
||||
|
||||
/* private field of GC */
|
||||
typedef struct {
|
||||
|
@ -82,22 +81,6 @@ typedef struct {
|
|||
CfbBits xor, and;
|
||||
} 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 *)\
|
||||
dixLookupPrivate(&(_pWin)->devPrivates, cfbWindowPrivateKey))
|
||||
|
||||
|
||||
/* cfb8bit.c */
|
||||
|
||||
extern int cfbSetStipple(
|
||||
int /*alu*/,
|
||||
CfbBits /*fg*/,
|
||||
|
@ -314,7 +297,6 @@ extern int cfb8SegmentSS1RectXor(
|
|||
|
||||
extern Bool cfbAllocatePrivates(
|
||||
ScreenPtr /*pScreen*/,
|
||||
DevPrivateKey * /*window_key*/,
|
||||
DevPrivateKey * /*gc_key*/
|
||||
);
|
||||
/* cfbbitblt.c */
|
||||
|
@ -807,27 +789,6 @@ extern void cfbFillPoly1RectGeneral(
|
|||
int /*count*/,
|
||||
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 */
|
||||
|
||||
extern void cfbPolyPoint(
|
||||
|
|
|
@ -45,7 +45,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "mibstore.h"
|
||||
|
||||
#if 1 || PSZ==8
|
||||
DevPrivateKey cfbWindowPrivateKey = &cfbWindowPrivateKey;
|
||||
DevPrivateKey cfbGCPrivateKey = &cfbGCPrivateKey;
|
||||
#endif
|
||||
#ifdef CFB_NEED_SCREEN_PRIVATE
|
||||
|
@ -54,28 +53,18 @@ DevPrivateKey cfbScreenPrivateKey = &cfbScreenPrivateKey;
|
|||
|
||||
|
||||
Bool
|
||||
cfbAllocatePrivates(pScreen, window_key, gc_key)
|
||||
ScreenPtr pScreen;
|
||||
DevPrivateKey *window_key, *gc_key;
|
||||
cfbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *gc_key)
|
||||
{
|
||||
if (!window_key || !gc_key || (!*window_key && !*gc_key))
|
||||
if (!gc_key || !*gc_key)
|
||||
{
|
||||
if (!mfbAllocatePrivates(pScreen,
|
||||
&cfbWindowPrivateKey, &cfbGCPrivateKey))
|
||||
if (!mfbAllocatePrivates(pScreen, &cfbGCPrivateKey))
|
||||
return FALSE;
|
||||
if (window_key)
|
||||
*window_key = cfbWindowPrivateKey;
|
||||
if (gc_key)
|
||||
*gc_key = cfbGCPrivateKey;
|
||||
}
|
||||
else
|
||||
{
|
||||
cfbWindowPrivateKey = *window_key;
|
||||
cfbGCPrivateKey = *gc_key;
|
||||
}
|
||||
if (!dixRequestPrivate(cfbWindowPrivateKey, sizeof(cfbPrivWin)))
|
||||
return FALSE;
|
||||
if (!dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC)))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC));
|
||||
}
|
||||
|
|
|
@ -71,8 +71,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
#undef cfbDoBitbltGeneral
|
||||
#undef cfbDoBitbltOr
|
||||
#undef cfbDoBitbltXor
|
||||
#undef cfbFillBoxSolid
|
||||
#undef cfbFillBoxTile32
|
||||
#undef cfbFillBoxTile32sCopy
|
||||
#undef cfbFillBoxTile32sGeneral
|
||||
#undef cfbFillBoxTileOdd
|
||||
|
@ -108,7 +106,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
#undef cfbNonTEOps
|
||||
#undef cfbNonTEOps1Rect
|
||||
#undef cfbPadPixmap
|
||||
#undef cfbPaintWindow
|
||||
#undef cfbPolyFillArcSolidCopy
|
||||
#undef cfbPolyFillArcSolidGeneral
|
||||
#undef cfbPolyFillRect
|
||||
|
@ -250,8 +247,6 @@ cfb can not hack PSZ yet
|
|||
#define cfbDoBitbltOr CFBNAME(DoBitbltOr)
|
||||
#define cfbDoBitbltXor CFBNAME(DoBitbltXor)
|
||||
#define cfbExpandDirectColors CFBNAME(cfbExpandDirectColors)
|
||||
#define cfbFillBoxSolid CFBNAME(FillBoxSolid)
|
||||
#define cfbFillBoxTile32 CFBNAME(FillBoxTile32)
|
||||
#define cfbFillBoxTile32sCopy CFBNAME(FillBoxTile32sCopy)
|
||||
#define cfbFillBoxTile32sGeneral CFBNAME(FillBoxTile32sGeneral)
|
||||
#define cfbFillBoxTileOdd CFBNAME(FillBoxTileOdd)
|
||||
|
@ -288,7 +283,6 @@ cfb can not hack PSZ yet
|
|||
#define cfbNonTEOps CFBNAME(NonTEOps)
|
||||
#define cfbNonTEOps1Rect CFBNAME(NonTEOps1Rect)
|
||||
#define cfbPadPixmap CFBNAME(PadPixmap)
|
||||
#define cfbPaintWindow CFBNAME(PaintWindow)
|
||||
#define cfbPolyFillArcSolidCopy CFBNAME(PolyFillArcSolidCopy)
|
||||
#define cfbPolyFillArcSolidGeneral CFBNAME(PolyFillArcSolidGeneral)
|
||||
#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 width; /* pixel width of frame buffer */
|
||||
{
|
||||
if (!cfbAllocatePrivates(pScreen, NULL, NULL))
|
||||
if (!cfbAllocatePrivates(pScreen, NULL))
|
||||
return FALSE;
|
||||
pScreen->defColormap = FakeClientID(0);
|
||||
/* let CreateDefColormap do whatever it wants for pixels */
|
||||
|
@ -103,8 +103,6 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
|||
pScreen->ChangeWindowAttributes = cfbChangeWindowAttributes;
|
||||
pScreen->RealizeWindow = cfbMapWindow;
|
||||
pScreen->UnrealizeWindow = cfbUnmapWindow;
|
||||
pScreen->PaintWindowBackground = cfbPaintWindow;
|
||||
pScreen->PaintWindowBorder = cfbPaintWindow;
|
||||
pScreen->CopyWindow = cfbCopyWindow;
|
||||
pScreen->CreatePixmap = cfbCreatePixmap;
|
||||
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.
|
||||
*/
|
||||
|
||||
|
|
|
@ -74,8 +74,6 @@
|
|||
#undef cfbDoBitbltOr
|
||||
#undef cfbDoBitbltXor
|
||||
#undef cfbExpandDirectColors
|
||||
#undef cfbFillBoxSolid
|
||||
#undef cfbFillBoxTile32
|
||||
#undef cfbFillBoxTile32sCopy
|
||||
#undef cfbFillBoxTile32sGeneral
|
||||
#undef cfbFillBoxTileOdd
|
||||
|
@ -112,7 +110,6 @@
|
|||
#undef cfbNonTEOps
|
||||
#undef cfbNonTEOps1Rect
|
||||
#undef cfbPadPixmap
|
||||
#undef cfbPaintWindow
|
||||
#undef cfbPolyFillArcSolidCopy
|
||||
#undef cfbPolyFillArcSolidGeneral
|
||||
#undef cfbPolyFillRect
|
||||
|
|
185
cfb/cfbwindow.c
185
cfb/cfbwindow.c
|
@ -60,19 +60,8 @@ SOFTWARE.
|
|||
#include "cfbmskbits.h"
|
||||
|
||||
Bool
|
||||
cfbCreateWindow(pWin)
|
||||
WindowPtr pWin;
|
||||
cfbCreateWindow(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
|
||||
/* Setup pointer to Screen pixmap */
|
||||
dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey,
|
||||
|
@ -83,17 +72,8 @@ cfbCreateWindow(pWin)
|
|||
}
|
||||
|
||||
Bool
|
||||
cfbDestroyWindow(pWin)
|
||||
WindowPtr pWin;
|
||||
cfbDestroyWindow(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);
|
||||
}
|
||||
|
||||
|
@ -105,47 +85,10 @@ cfbMapWindow(pWindow)
|
|||
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*/
|
||||
Bool
|
||||
cfbPositionWindow(pWin, x, y)
|
||||
WindowPtr pWin;
|
||||
int x, y;
|
||||
cfbPositionWindow(WindowPtr pWin, int x, int 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);
|
||||
}
|
||||
|
||||
|
@ -209,129 +152,9 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc)
|
|||
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 under cfbWindowPrivateKey.
|
||||
*/
|
||||
Bool
|
||||
cfbChangeWindowAttributes(pWin, mask)
|
||||
WindowPtr pWin;
|
||||
unsigned long mask;
|
||||
cfbChangeWindowAttributes(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);
|
||||
}
|
||||
|
||||
|
|
|
@ -461,7 +461,6 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
|
|||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
WindowPtr pParent = pWin->parent;
|
||||
PixmapPtr pPixmap;
|
||||
GCPtr pGC;
|
||||
|
||||
pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth);
|
||||
|
||||
|
@ -471,25 +470,63 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
|
|||
pPixmap->screen_x = x;
|
||||
pPixmap->screen_y = y;
|
||||
|
||||
pGC = GetScratchGC (pWin->drawable.depth, pScreen);
|
||||
|
||||
/*
|
||||
* Copy bits from the parent into the new pixmap so that it will
|
||||
* have "reasonable" contents in case for background None areas.
|
||||
*/
|
||||
if (pGC)
|
||||
if (pParent->drawable.depth == pWin->drawable.depth)
|
||||
{
|
||||
XID val = IncludeInferiors;
|
||||
GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen);
|
||||
|
||||
ValidateGC(&pPixmap->drawable, pGC);
|
||||
dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
|
||||
(*pGC->ops->CopyArea) (&pParent->drawable,
|
||||
&pPixmap->drawable,
|
||||
pGC,
|
||||
x - pParent->drawable.x,
|
||||
y - pParent->drawable.y,
|
||||
w, h, 0, 0);
|
||||
FreeScratchGC (pGC);
|
||||
/*
|
||||
* Copy bits from the parent into the new pixmap so that it will
|
||||
* have "reasonable" contents in case for background None areas.
|
||||
*/
|
||||
if (pGC)
|
||||
{
|
||||
XID val = IncludeInferiors;
|
||||
|
||||
ValidateGC(&pPixmap->drawable, pGC);
|
||||
dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
|
||||
(*pGC->ops->CopyArea) (&pParent->drawable,
|
||||
&pPixmap->drawable,
|
||||
pGC,
|
||||
x - pParent->drawable.x,
|
||||
y - pParent->drawable.y,
|
||||
w, h, 0, 0);
|
||||
FreeScratchGC (pGC);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PictFormatPtr pSrcFormat = compWindowFormat (pParent);
|
||||
PictFormatPtr pDstFormat = compWindowFormat (pWin);
|
||||
XID inferiors = IncludeInferiors;
|
||||
int error;
|
||||
|
||||
PicturePtr pSrcPicture = CreatePicture (None,
|
||||
&pParent->drawable,
|
||||
pSrcFormat,
|
||||
CPSubwindowMode,
|
||||
&inferiors,
|
||||
serverClient, &error);
|
||||
|
||||
PicturePtr pDstPicture = CreatePicture (None,
|
||||
&pPixmap->drawable,
|
||||
pDstFormat,
|
||||
0, 0,
|
||||
serverClient, &error);
|
||||
|
||||
if (pSrcPicture && pDstPicture)
|
||||
{
|
||||
CompositePicture (PictOpSrc,
|
||||
pSrcPicture,
|
||||
NULL,
|
||||
pDstPicture,
|
||||
x - pParent->drawable.x,
|
||||
y - pParent->drawable.y,
|
||||
0, 0, 0, 0, w, h);
|
||||
}
|
||||
if (pSrcPicture)
|
||||
FreePicture (pSrcPicture, 0);
|
||||
if (pDstPicture)
|
||||
FreePicture (pDstPicture, 0);
|
||||
}
|
||||
return pPixmap;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ compCloseScreen (int index, ScreenPtr pScreen)
|
|||
pScreen->ChangeBorderWidth = cs->ChangeBorderWidth;
|
||||
|
||||
pScreen->ClipNotify = cs->ClipNotify;
|
||||
pScreen->PaintWindowBackground = cs->PaintWindowBackground;
|
||||
pScreen->UnrealizeWindow = cs->UnrealizeWindow;
|
||||
pScreen->RealizeWindow = cs->RealizeWindow;
|
||||
pScreen->DestroyWindow = cs->DestroyWindow;
|
||||
|
@ -411,9 +410,6 @@ compScreenInit (ScreenPtr pScreen)
|
|||
cs->UnrealizeWindow = pScreen->UnrealizeWindow;
|
||||
pScreen->UnrealizeWindow = compUnrealizeWindow;
|
||||
|
||||
cs->PaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
pScreen->PaintWindowBackground = compPaintWindowBackground;
|
||||
|
||||
cs->ClipNotify = pScreen->ClipNotify;
|
||||
pScreen->ClipNotify = compClipNotify;
|
||||
|
||||
|
|
|
@ -124,7 +124,6 @@ typedef struct _CompScreen {
|
|||
DestroyWindowProcPtr DestroyWindow;
|
||||
RealizeWindowProcPtr RealizeWindow;
|
||||
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||
PaintWindowProcPtr PaintWindowBackground;
|
||||
ClipNotifyProcPtr ClipNotify;
|
||||
/*
|
||||
* Called from ConfigureWindow, these
|
||||
|
@ -241,6 +240,9 @@ compCheckTree (ScreenPtr pScreen);
|
|||
#define compCheckTree(s)
|
||||
#endif
|
||||
|
||||
PictFormatPtr
|
||||
compWindowFormat (WindowPtr pWin);
|
||||
|
||||
void
|
||||
compSetPixmap (WindowPtr pWin, PixmapPtr pPixmap);
|
||||
|
||||
|
@ -256,9 +258,6 @@ compRealizeWindow (WindowPtr pWin);
|
|||
Bool
|
||||
compUnrealizeWindow (WindowPtr pWin);
|
||||
|
||||
void
|
||||
compPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
void
|
||||
compClipNotify (WindowPtr pWin, int dx, int dy);
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ compRepaintBorder (ClientPtr pClient, pointer closure)
|
|||
|
||||
REGION_NULL(pScreen, &exposed);
|
||||
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);
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -240,21 +240,6 @@ compUnrealizeWindow (WindowPtr pWin)
|
|||
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
|
||||
* We use this to make sure our extra borderClip has the right origin
|
||||
|
@ -685,7 +670,7 @@ compGetWindowVisual (WindowPtr pWin)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static PictFormatPtr
|
||||
PictFormatPtr
|
||||
compWindowFormat (WindowPtr pWin)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
|
|
|
@ -74,11 +74,12 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
|
|||
int ret, err;
|
||||
DeviceIntPtr dev = NULL;
|
||||
|
||||
dbus_message_iter_init_append(reply, &reply_iter);
|
||||
|
||||
if (!dbus_message_iter_init(message, &iter)) {
|
||||
ErrorF("[config/dbus] couldn't initialise iterator\n");
|
||||
return BadAlloc;
|
||||
MALFORMED_MESSAGE();
|
||||
}
|
||||
dbus_message_iter_init_append(reply, &reply_iter);
|
||||
|
||||
options = xcalloc(sizeof(*options), 1);
|
||||
if (!options) {
|
||||
|
@ -138,7 +139,7 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
|
|||
MALFORMED_MESSAGE();
|
||||
options->value = xstrdup(tmp);
|
||||
if (!options->value) {
|
||||
ErrorF("[config] couldn't duplicate option!\n");
|
||||
ErrorF("[config/dbus] couldn't duplicate option!\n");
|
||||
ret = BadAlloc;
|
||||
goto unwind;
|
||||
}
|
||||
|
@ -200,12 +201,13 @@ remove_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
|
|||
DeviceIntPtr dev;
|
||||
DBusMessageIter iter, reply_iter;
|
||||
|
||||
if (!dbus_message_iter_init(message, &iter)) {
|
||||
ErrorF("[config] failed to init iterator\n");
|
||||
return BadAlloc;
|
||||
}
|
||||
dbus_message_iter_init_append(reply, &reply_iter);
|
||||
|
||||
if (!dbus_message_iter_init(message, &iter)) {
|
||||
ErrorF("[config/dbus] failed to init iterator\n");
|
||||
MALFORMED_MESSAGE();
|
||||
}
|
||||
|
||||
if (!dbus_message_get_args(message, error, DBUS_TYPE_UINT32,
|
||||
&deviceid, DBUS_TYPE_INVALID)) {
|
||||
MALFORMED_MESSAGE_ERROR();
|
||||
|
@ -213,12 +215,12 @@ remove_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
|
|||
|
||||
dev = LookupDeviceIntRec(deviceid);
|
||||
if (!dev) {
|
||||
DebugF("[config] bogus device id %d given\n", deviceid);
|
||||
DebugF("[config/dbus] bogus device id %d given\n", deviceid);
|
||||
ret = BadMatch;
|
||||
goto unwind;
|
||||
}
|
||||
|
||||
DebugF("[config] removing device %s (id %d)\n", dev->name, deviceid);
|
||||
DebugF("[config/dbus] removing device %s (id %d)\n", dev->name, deviceid);
|
||||
|
||||
/* Call PIE here so we don't try to dereference a device that's
|
||||
* already been removed. */
|
||||
|
|
472
configure.ac
472
configure.ac
|
@ -26,9 +26,7 @@ dnl
|
|||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
dnl This is the not the Xorg version number, it's the server version number.
|
||||
dnl Yes, that's weird.
|
||||
AC_INIT([xorg-server], 1.3.99.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||
AC_INIT([xorg-server], 1.4.0.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
|
||||
AM_MAINTAINER_MODE
|
||||
|
@ -97,6 +95,8 @@ AC_HEADER_DIRENT
|
|||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
|
||||
|
||||
AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"])
|
||||
|
@ -166,6 +166,9 @@ b = bswap16(a);
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNC([dlopen], [],
|
||||
AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
|
||||
|
@ -183,6 +186,7 @@ AC_CHECK_FUNC([getpeerucred],
|
|||
AC_DEFINE(HAS_GETPEERUCRED, 1, [Have the 'getpeerucred' function.]))
|
||||
AC_CHECK_FUNC([strlcat], HAVE_STRLCAT=yes, HAVE_STRLCAT=no)
|
||||
AM_CONDITIONAL(NEED_STRLCAT, [test x$HAVE_STRLCAT = xno])
|
||||
AC_CHECK_FUNC([strlcpy], AC_DEFINE(HAS_STRLCPY, 1, [Have the 'strlcpy' function]))
|
||||
|
||||
AM_CONDITIONAL(NEED_VSNPRINTF, [test x$HAVE_VSNPRINTF = xno])
|
||||
|
||||
|
@ -371,14 +375,22 @@ case $host_os in
|
|||
esac
|
||||
AM_CONDITIONAL(KDRIVE_HW, test "x$KDRIVE_HW" = xyes)
|
||||
|
||||
DEFAULT_VENDOR_NAME="The X.Org Foundation"
|
||||
DEFAULT_VENDOR_NAME_SHORT="X.Org"
|
||||
DEFAULT_VERSION_MAJOR=7
|
||||
DEFAULT_VERSION_MINOR=2
|
||||
DEFAULT_VERSION_PATCH=0
|
||||
DEFAULT_VERSION_SNAP=0
|
||||
DEFAULT_RELEASE_DATE="21 December 2005"
|
||||
DEFAULT_VENDOR_WEB="http://wiki.x.org"
|
||||
XORG_RELEASE_VERSION
|
||||
dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the
|
||||
dnl major number
|
||||
PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1`
|
||||
PVS=`echo $PACKAGE_VERSION | cut -d . -f 4`
|
||||
if test "x$PVS" = "x"; then
|
||||
PVS="0"
|
||||
fi
|
||||
|
||||
VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)"
|
||||
VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}"
|
||||
|
||||
VENDOR_NAME="The X.Org Foundation"
|
||||
VENDOR_NAME_SHORT="X.Org"
|
||||
RELEASE_DATE="5 September 2007"
|
||||
VENDOR_WEB="http://wiki.x.org"
|
||||
|
||||
m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
|
||||
|
||||
|
@ -394,36 +406,13 @@ AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backe
|
|||
[INT10="$DEFAULT_INT10"])
|
||||
AC_ARG_WITH(vendor-name, AS_HELP_STRING([--with-vendor-name=VENDOR],
|
||||
[Vendor string reported by the server]),
|
||||
[ VENDOR_STRING="$withval" ],
|
||||
[ VENDOR_STRING="$DEFAULT_VENDOR_NAME" ])
|
||||
[ VENDOR_NAME="$withval" ], [])
|
||||
AC_ARG_WITH(vendor-name-short, AS_HELP_STRING([--with-vendor-name-short=VENDOR],
|
||||
[Short version of vendor string reported by the server]),
|
||||
[ VENDOR_STRING_SHORT="$withval" ],
|
||||
[ VENDOR_STRING_SHORT="$DEFAULT_VENDOR_NAME_SHORT" ])
|
||||
AC_ARG_WITH(release-major, AS_HELP_STRING([--with-release-major=MAJOR],
|
||||
[Release major number reported by the server]),
|
||||
[ VERSION_MAJOR="$withval" ],
|
||||
[ VERSION_MAJOR="$DEFAULT_VERSION_MAJOR" ])
|
||||
AC_ARG_WITH(release-minor, AS_HELP_STRING([--with-release-minor=MINOR],
|
||||
[Release minor number reported by the server]),
|
||||
[ VERSION_MINOR="$withval" ],
|
||||
[ VERSION_MINOR="$DEFAULT_VERSION_MINOR" ])
|
||||
AC_ARG_WITH(release-patch, AS_HELP_STRING([--with-release-patch=PATCH],
|
||||
[Release patch number reported by the server]),
|
||||
[ VERSION_PATCH="$withval" ],
|
||||
[ VERSION_PATCH="$DEFAULT_VERSION_PATCH" ])
|
||||
AC_ARG_WITH(release-snap, AS_HELP_STRING([--with-release-snap=SNAP],
|
||||
[Release snap number reported by the server]),
|
||||
[ VERSION_SNAP="$withval" ],
|
||||
[ VERSION_SNAP="$DEFAULT_VERSION_SNAP" ])
|
||||
AC_ARG_WITH(release-date, AS_HELP_STRING([--with-release-date=DATE],
|
||||
[Release date reported by the server]),
|
||||
[ RELEASE_DATE="$withval" ],
|
||||
[ RELEASE_DATE="$DEFAULT_RELEASE_DATE" ])
|
||||
[ VENDOR_NAME_SHORT="$withval" ], [])
|
||||
AC_ARG_WITH(vendor-web, AS_HELP_STRING([--with-vendor-web=URL],
|
||||
[Vendor web address reported by the server]),
|
||||
[ VENDOR_WEB="$withval" ],
|
||||
[ VENDOR_WEB="$DEFAULT_VENDOR_WEB" ])
|
||||
[ VENDOR_WEB="$withval" ], [])
|
||||
AC_ARG_WITH(module-dir, AS_HELP_STRING([--with-module-dir=DIR],
|
||||
[Directory where modules are installed (default: $libdir/xorg/modules)]),
|
||||
[ moduledir="$withval" ],
|
||||
|
@ -538,6 +527,7 @@ AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server
|
|||
AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no])
|
||||
AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
|
||||
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
|
||||
AC_ARG_ENABLE(xdarwin, AS_HELP_STRING([--enable-xdarwin], [Build XDarwin server (default: auto)]), [XDARWIN=$enableval], [XDARWIN=auto])
|
||||
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
|
||||
AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no])
|
||||
AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
|
||||
|
@ -625,13 +615,16 @@ XEXT_INC='-I$(top_srcdir)/Xext'
|
|||
XEXT_LIB='$(top_builddir)/Xext/libXext.la'
|
||||
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
|
||||
|
||||
PIXMAN="[pixman-1 >= 0.9.5]"
|
||||
PKG_CHECK_MODULES(PIXMAN, $PIXMAN)
|
||||
AC_SUBST(PIXMAN_CFLAGS)
|
||||
|
||||
dnl Core modules for most extensions, et al.
|
||||
REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto [xproto >= 7.0.9] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.2] [kbproto >= 1.0.3]"
|
||||
REQUIRED_LIBS="xfont xau fontenc $PIXMAN"
|
||||
# Require updated renderproto for ABI sanity if we're 64-bit.
|
||||
if test "$ac_cv_sizeof_unsigned_long" = 8; then
|
||||
RENDERPROTO="[renderproto >= 0.9.3]"
|
||||
else
|
||||
RENDERPROTO="renderproto"
|
||||
fi
|
||||
|
||||
REQUIRED_MODULES="[randrproto >= 1.2] $RENDERPROTO [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto [xproto >= 7.0.9] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.2] [kbproto >= 1.0.3]"
|
||||
REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.9.5]"
|
||||
|
||||
dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
|
||||
dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config
|
||||
|
@ -675,6 +668,49 @@ if test "x$NEED_DBUS" = xyes; then
|
|||
fi
|
||||
CONFIG_LIB='$(top_builddir)/config/libconfig.a'
|
||||
|
||||
AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
|
||||
[AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt],
|
||||
[have_clock_gettime=no])])
|
||||
|
||||
AC_MSG_CHECKING([for a useful monotonic clock ...])
|
||||
|
||||
if ! test "x$have_clock_gettime" = xno; then
|
||||
if ! test "x$have_clock_gettime" = xyes; then
|
||||
CLOCK_LIBS="$have_clock_gettime"
|
||||
else
|
||||
CLOCK_LIBS=""
|
||||
fi
|
||||
|
||||
LIBS_SAVE="$LIBS"
|
||||
LIBS="$CLOCK_LIBS"
|
||||
|
||||
AC_RUN_IFELSE([
|
||||
#define _POSIX_C_SOURCE 199309L
|
||||
#include <time.h>
|
||||
|
||||
int main(int argc, char *argv[[]]) {
|
||||
struct timespec tp;
|
||||
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
|
||||
[MONOTONIC_CLOCK="cross compiling"])
|
||||
|
||||
LIBS="$LIBS_SAVE"
|
||||
else
|
||||
MONOTONIC_CLOCK=no
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$MONOTONIC_CLOCK])
|
||||
|
||||
if test "x$MONOTONIC_CLOCK" = xyes; then
|
||||
AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()])
|
||||
LIBS="$LIBS $CLOCK_LIBS"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XV, [test "x$XV" = xyes])
|
||||
if test "x$XV" = xyes; then
|
||||
AC_DEFINE(XV, 1, [Support Xv extension])
|
||||
|
@ -760,7 +796,7 @@ AM_CONDITIONAL(AIGLX, test "x$AIGLX" = xyes)
|
|||
|
||||
if test "x$GLX_USE_TLS" = xyes -a "x$AIGLX" = xyes; then
|
||||
GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
|
||||
GLX_LIBS="$GLX_LIBS -lpthread"
|
||||
GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread"
|
||||
fi
|
||||
AC_SUBST([GLX_DEFINES])
|
||||
|
||||
|
@ -969,29 +1005,13 @@ if test "x$USE_RGB_BUILTIN" = xyes; then
|
|||
AC_DEFINE(USE_RGB_BUILTIN, 1, [Use built-in RGB color database])
|
||||
fi
|
||||
|
||||
VENDOR_RELEASE="((($VERSION_MAJOR) * 10000000) + (($VERSION_MINOR) * 100000) + (($VERSION_PATCH) * 1000) + $VERSION_SNAP)"
|
||||
|
||||
if test $VERSION_SNAP = "0"; then
|
||||
if test $VERSION_PATCH = "0"; then
|
||||
VENDOR_VERSION_STRING="${VERSION_MAJOR}.${VERSION_MINOR}"
|
||||
else
|
||||
VENDOR_VERSION_STRING="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
|
||||
fi
|
||||
else
|
||||
VENDOR_VERSION_STRING="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_SNAP}"
|
||||
fi
|
||||
|
||||
VENDOR_RELEASE_STRING="Release ${VENDOR_VERSION_STRING}"
|
||||
VENDOR_MAN_VERSION="Version ${VENDOR_VERSION_STRING}"
|
||||
|
||||
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
|
||||
AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
|
||||
AC_DEFINE_DIR(SERVERCONFIGdir, SERVERCONFIG, [Server config path])
|
||||
AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path])
|
||||
AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
|
||||
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name])
|
||||
AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_STRING_SHORT"], [Short vendor name])
|
||||
AC_DEFINE_UNQUOTED(XORG_RELEASE, ["$VENDOR_RELEASE_STRING"], [Vendor release])
|
||||
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name])
|
||||
AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name])
|
||||
AC_DEFINE_UNQUOTED(XORG_DATE, ["$RELEASE_DATE"], [Vendor release])
|
||||
AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version])
|
||||
AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address])
|
||||
|
@ -1004,8 +1024,8 @@ AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name])
|
|||
AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor])
|
||||
AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string])
|
||||
|
||||
AC_SUBST([VENDOR_STRING])
|
||||
AC_SUBST([VENDOR_STRING_SHORT])
|
||||
AC_SUBST([VENDOR_NAME])
|
||||
AC_SUBST([VENDOR_NAME_SHORT])
|
||||
AC_SUBST([VENDOR_RELEASE])
|
||||
AC_SUBST([VENDOR_MAN_VERSION])
|
||||
|
||||
|
@ -1049,9 +1069,30 @@ CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
|
|||
PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS])
|
||||
PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
|
||||
|
||||
# Autotools has some unfortunate issues with library handling. In order to
|
||||
# get a server to rebuild when a dependency in the tree is changed, it must
|
||||
# be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be
|
||||
# listed there, or some versions of autotols will break (especially if a -L
|
||||
# is required to find the library). So, we keep two sets of libraries
|
||||
# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which
|
||||
# will go into the _DEPENDENCIES and _LDADD of the server, and
|
||||
# NAMESPACE_SYS_LIBS which will go into only the _LDADD. The
|
||||
# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in
|
||||
# NAMESPACE_SYS_LIBS.
|
||||
#
|
||||
# XSERVER_LIBS is the set of in-tree libraries which all servers require.
|
||||
# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers
|
||||
# require.
|
||||
#
|
||||
XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}"
|
||||
XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
|
||||
AC_SUBST([SYS_LIBS])
|
||||
XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
|
||||
XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
|
||||
AC_SUBST([XSERVER_LIBS])
|
||||
AC_SUBST([XSERVER_SYS_LIBS])
|
||||
|
||||
if test "x$HAVE_LAUNCHD" = xyes; then
|
||||
XSERVER_CFLAGS="$XSERVER_CFLAGS -DHAVE_LAUNCHD"
|
||||
fi
|
||||
|
||||
# The Xorg binary needs to export symbols so that they can be used from modules
|
||||
# Some platforms require extra flags to do this. gcc should set these flags
|
||||
|
@ -1079,50 +1120,6 @@ case $host_os in
|
|||
esac
|
||||
AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
|
||||
|
||||
AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
|
||||
[AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt],
|
||||
[have_clock_gettime=no])])
|
||||
|
||||
AC_MSG_CHECKING([for a useful monotonic clock ...])
|
||||
|
||||
if ! test "x$have_clock_gettime" = xno; then
|
||||
if ! test "x$have_clock_gettime" = xyes; then
|
||||
CLOCK_LIBS="$have_clock_gettime"
|
||||
else
|
||||
CLOCK_LIBS=""
|
||||
fi
|
||||
|
||||
LIBS_SAVE="$LIBS"
|
||||
LIBS="$CLOCK_LIBS"
|
||||
|
||||
AC_RUN_IFELSE([
|
||||
#define _POSIX_C_SOURCE 199309L
|
||||
#include <time.h>
|
||||
|
||||
int main(int argc, char *argv[[]]) {
|
||||
struct timespec tp;
|
||||
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
|
||||
[MONOTONIC_CLOCK="cross compiling"])
|
||||
|
||||
LIBS="$LIBS_SAVE"
|
||||
else
|
||||
MONOTONIC_CLOCK=no
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$MONOTONIC_CLOCK])
|
||||
|
||||
if test "x$MONOTONIC_CLOCK" = xyes; then
|
||||
AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()])
|
||||
XSERVER_LIBS="$XSERVER_LIBS $CLOCK_LIBS"
|
||||
LIBS="$LIBS $CLOCK_LIBS"
|
||||
fi
|
||||
|
||||
dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so
|
||||
dnl we need to replicate that here until those can all be fixed
|
||||
AC_MSG_CHECKING([if SVR4 needs to be defined])
|
||||
|
@ -1149,8 +1146,6 @@ AH_VERBATIM([X_BYTE_ORDER],[
|
|||
#endif
|
||||
])
|
||||
|
||||
AC_SUBST([XSERVER_LIBS])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl DDX section.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
@ -1158,7 +1153,7 @@ dnl ---------------------------------------------------------------------------
|
|||
dnl DMX DDX
|
||||
|
||||
AC_MSG_CHECKING([whether to build Xdmx DDX])
|
||||
PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN], [have_dmx=yes], [have_dmx=no])
|
||||
PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no])
|
||||
if test "x$DMX" = xauto; then
|
||||
DMX="$have_dmx"
|
||||
fi
|
||||
|
@ -1171,8 +1166,12 @@ if test "x$DMX" = xyes; then
|
|||
modules not found.])
|
||||
fi
|
||||
DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC"
|
||||
XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB"
|
||||
XDMX_CFLAGS="$DMXMODULES_CFLAGS"
|
||||
XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB"
|
||||
XDMX_SYS_LIBS="$DMXMODULES_LIBS"
|
||||
AC_SUBST([XDMX_CFLAGS])
|
||||
AC_SUBST([XDMX_LIBS])
|
||||
AC_SUBST([XDMX_SYS_LIBS])
|
||||
|
||||
dnl USB sources in DMX require <linux/input.h>
|
||||
AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes",
|
||||
|
@ -1210,8 +1209,10 @@ AC_MSG_RESULT([$XVFB])
|
|||
AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
|
||||
|
||||
if test "x$XVFB" = xyes; then
|
||||
XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS"
|
||||
XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB"
|
||||
XVFB_SYS_LIBS="$XVFBMODULES_LIBS"
|
||||
AC_SUBST([XVFB_LIBS])
|
||||
AC_SUBST([XVFB_SYS_LIBS])
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1226,8 +1227,10 @@ AC_MSG_RESULT([$XNEST])
|
|||
AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes])
|
||||
|
||||
if test "x$XNEST" = xyes; then
|
||||
XNEST_LIBS="$MI_LIB $CONFIG_LIB $XSERVER_LIBS $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS"
|
||||
XNEST_LIBS="$CONFIG_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB"
|
||||
XNEST_SYS_LIBS="$XNESTMODULES_LIBS"
|
||||
AC_SUBST([XNEST_LIBS])
|
||||
AC_SUBST([XNEST_SYS_LIBS])
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1238,6 +1241,7 @@ if test "x$XORG" = xauto; then
|
|||
XORG="yes"
|
||||
case $host_os in
|
||||
cygwin*) XORG="no" ;;
|
||||
darwin*) XORG="no" ;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT([$XORG])
|
||||
|
@ -1248,14 +1252,15 @@ AC_MSG_CHECKING([whether to build Xgl DDX])
|
|||
if test "x$XGL" != xno; then
|
||||
PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XGL=yes], [XGL=no])
|
||||
AC_SUBST(XGLMODULES_CFLAGS)
|
||||
AC_SUBST(XGLMODULES_LIBS)
|
||||
fi
|
||||
AC_MSG_RESULT([$XGL])
|
||||
AM_CONDITIONAL(XGL, [test "x$XGL" = xyes])
|
||||
|
||||
if test "x$XGL" = xyes; then
|
||||
XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
|
||||
XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB"
|
||||
XGL_SYS_LIBS="$XGLMODULES_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
|
||||
AC_SUBST([XGL_LIBS])
|
||||
AC_SUBST([XGL_SYS_LIBS])
|
||||
AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules])
|
||||
|
||||
xglmoduledir="$moduledir/xgl"
|
||||
|
@ -1269,14 +1274,15 @@ AC_MSG_CHECKING([whether to build Xegl DDX])
|
|||
if test "x$XEGL" != xno; then
|
||||
PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XEGL=yes], [XEGL=no])
|
||||
AC_SUBST(XEGLMODULES_CFLAGS)
|
||||
AC_SUBST(XEGLMODULES_LIBS)
|
||||
fi
|
||||
AC_MSG_RESULT([$XEGL])
|
||||
AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes])
|
||||
|
||||
if test "x$XEGL" = xyes; then
|
||||
XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
|
||||
XEGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB"
|
||||
XEGL_SYS_LIBS = "$XEGL_SYS_LIBS $XEGLMODULES_LIBS $GLX_SYS_LIBS"
|
||||
AC_SUBST([XEGL_LIBS])
|
||||
AC_SUBST([XEGL_SYS_LIBS])
|
||||
fi
|
||||
|
||||
dnl Xglx DDX
|
||||
|
@ -1285,23 +1291,19 @@ AC_MSG_CHECKING([whether to build Xglx DDX])
|
|||
if test "x$XGLX" != xno; then
|
||||
PKG_CHECK_MODULES([XGLXMODULES], [glitz-glx >= 0.4.3 xrender], [XGLX=yes], [XGLX=no])
|
||||
AC_SUBST(XGLXMODULES_CFLAGS)
|
||||
AC_SUBST(XGLXMODULES_LIBS)
|
||||
fi
|
||||
AC_MSG_RESULT([$XGLX])
|
||||
AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes])
|
||||
|
||||
if test "x$XGLX" = xyes; then
|
||||
XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
|
||||
XGLX_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB"
|
||||
XGLX_SYS_LIBS="$XGLX_SYS_LIBS $XGLXMODULES_LIBS $GLX_SYS_LIBS"
|
||||
AC_SUBST([XGLX_LIBS])
|
||||
AC_SUBST([XGLX_SYS_LIBS])
|
||||
fi
|
||||
|
||||
# XORG_CORE_LIBS is needed even if you're not building the Xorg DDX
|
||||
XORG_CORE_LIBS="$DIX_LIB $CONFIG_LIB"
|
||||
AC_SUBST([XORG_CORE_LIBS])
|
||||
|
||||
xorg_bus_linuxpci=no
|
||||
xorg_bus_freebsdpci=no
|
||||
xorg_bus_netbsdpci=no
|
||||
xorg_bus_bsdpci=no
|
||||
xorg_bus_ix86pci=no
|
||||
xorg_bus_ppcpci=no
|
||||
xorg_bus_sparcpci=no
|
||||
|
@ -1312,76 +1314,16 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
|
|||
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
|
||||
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
|
||||
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
|
||||
XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $SELINUX_LIB $OS_LIB"
|
||||
XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $SELINUX_LIB"
|
||||
|
||||
dnl Check to see if dlopen is in default libraries (like Solaris, which
|
||||
dnl has it in libc), or if libdl is needed to get it.
|
||||
AC_CHECK_FUNC([dlopen], [],
|
||||
AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl"))
|
||||
|
||||
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
|
||||
XSERVER_LIBS="$XSERVER_LIBS $PCIACCESS_LIBS"
|
||||
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS"
|
||||
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
|
||||
|
||||
case $host_os in
|
||||
darwin*)
|
||||
XORG_OS="Darwin"
|
||||
build_darwin=yes
|
||||
if test "X$XQUARTZ" = Xauto; then
|
||||
AC_CACHE_CHECK([for Carbon framework],xorg_cv_Carbon_framework,[
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -framework Carbon"
|
||||
AC_LINK_IFELSE([char FSFindFolder();
|
||||
int main() {
|
||||
FSFindFolder();
|
||||
return 0;}
|
||||
],[xorg_cv_Carbon_framework=yes],
|
||||
[xorg_cv_Carbon_framework=no])
|
||||
LDFLAGS=$save_LDFLAGS])
|
||||
if test "X$xorg_cv_Carbon_framework" = Xyes; then
|
||||
AC_DEFINE([DARWIN_WITH_QUARTZ],[1],
|
||||
[Have Quartz])
|
||||
XQUARTZ=yes
|
||||
else
|
||||
XQUARTZ=no
|
||||
fi
|
||||
fi
|
||||
# glxAGL / glxCGL don't work yet
|
||||
# AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[
|
||||
# save_LDFLAGS=$LDFLAGS
|
||||
# LDFLAGS="$LDFLAGS -framework AGL"
|
||||
# AC_LINK_IFELSE([char aglEnable();
|
||||
#int main() {
|
||||
#aglEnable();
|
||||
#return 0;}
|
||||
# ],[xorg_cv_AGL_framework=yes],
|
||||
# [xorg_cv_AGL_framework=no])
|
||||
# LDFLAGS=$save_LDFLAGS
|
||||
# ])
|
||||
xorg_cv_AGL_framework=no
|
||||
DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
|
||||
AC_SUBST([DARWIN_LIBS])
|
||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
||||
CFLAGS="${CFLAGS} -D__DARWIN__"
|
||||
PLIST_VERSION_STRING=$VENDOR_VERSION_STRING
|
||||
AC_SUBST([PLIST_VERSION_STRING])
|
||||
PLIST_VENDOR_WEB=$VENDOR_WEB
|
||||
AC_SUBST([PLIST_VENDOR_WEB])
|
||||
# Not sure that we should be disabling all these...
|
||||
if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86Misc extension])
|
||||
XF86MISC=no
|
||||
fi
|
||||
if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86VidMode extension])
|
||||
XF86VIDMODE=no
|
||||
fi
|
||||
if test "x$DGA" = xyes || test "x$DGA" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling DGA extension])
|
||||
DGA=no
|
||||
fi
|
||||
;;
|
||||
linux*)
|
||||
if test "x$LNXAPM" = xyes; then
|
||||
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
|
||||
|
@ -1410,35 +1352,17 @@ return 0;}
|
|||
freebsd* | kfreebsd*-gnu)
|
||||
XORG_OS="freebsd"
|
||||
XORG_OS_SUBDIR="bsd"
|
||||
case $host_cpu in
|
||||
i*86)
|
||||
;;
|
||||
*)
|
||||
xorg_bus_freebsdpci="yes"
|
||||
;;
|
||||
esac
|
||||
xorg_bus_bsdpci="yes"
|
||||
;;
|
||||
netbsd*)
|
||||
XORG_OS="netbsd"
|
||||
XORG_OS_SUBDIR="bsd"
|
||||
case $host_cpu in
|
||||
i*86|amd64*|x86_64*|ia64*)
|
||||
;;
|
||||
*)
|
||||
xorg_bus_netbsdpci="yes"
|
||||
;;
|
||||
esac
|
||||
xorg_bus_bsdpci="yes"
|
||||
;;
|
||||
openbsd*)
|
||||
XORG_OS="openbsd"
|
||||
XORG_OS_SUBDIR="bsd"
|
||||
case $host_cpu in
|
||||
i*86|amd64*|x86_64*|ia64*)
|
||||
;;
|
||||
*)
|
||||
xorg_bus_freebsdpci="yes"
|
||||
;;
|
||||
esac
|
||||
xorg_bus_bsdpci="yes"
|
||||
;;
|
||||
solaris*)
|
||||
XORG_OS="solaris"
|
||||
|
@ -1508,6 +1432,7 @@ return 0;}
|
|||
i*86)
|
||||
case $host_os in
|
||||
darwin*) ;;
|
||||
*bsd*) ;;
|
||||
*) xorg_bus_ix86pci=yes ;;
|
||||
esac
|
||||
;;
|
||||
|
@ -1526,8 +1451,7 @@ return 0;}
|
|||
;;
|
||||
x86_64*|amd64*)
|
||||
case $host_os in
|
||||
darwin*|freebsd*|kfreebsd*-gnu)
|
||||
# FreeBSD uses the system pci interface
|
||||
darwin*|*bsd*)
|
||||
;;
|
||||
*)
|
||||
xorg_bus_ix86pci="yes"
|
||||
|
@ -1570,10 +1494,11 @@ return 0;}
|
|||
if test -n "$XORG_MODULES"; then
|
||||
PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES])
|
||||
XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS"
|
||||
XORG_LIBS="$XORG_LIBS $XORG_MODULES_LIBS"
|
||||
XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
|
||||
fi
|
||||
|
||||
AC_SUBST([XORG_LIBS])
|
||||
AC_SUBST([XORG_SYS_LIBS])
|
||||
AC_SUBST([XORG_INCS])
|
||||
AC_SUBST([XORG_OS])
|
||||
AC_SUBST([XORG_OS_SUBDIR])
|
||||
|
@ -1621,8 +1546,7 @@ return 0;}
|
|||
fi
|
||||
AM_CONDITIONAL([XORG], [test "x$XORG" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_LINUXPCI], [test "x$xorg_bus_linuxpci" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_FREEBSDPCI], [test "x$xorg_bus_freebsdpci" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_NETBSDPCI], [test "x$xorg_bus_netbsdpci" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_IX86PCI], [test "x$xorg_bus_ix86pci" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_PPCPCI], [test "x$xorg_bus_ppcpci" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_SPARCPCI], [test "x$xorg_bus_sparcpci" = xyes])
|
||||
|
@ -1633,8 +1557,6 @@ AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes])
|
|||
AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes])
|
||||
AM_CONDITIONAL([SOLARIS_USL_CONSOLE], [test "x$solaris_usl_console" = xyes])
|
||||
AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes])
|
||||
AM_CONDITIONAL([BUILD_DARWIN],[test "X$build_darwin" = Xyes])
|
||||
AM_CONDITIONAL([XQUARTZ],[test "X$XQUARTZ" = Xyes])
|
||||
AM_CONDITIONAL(DGA, [test "x$DGA" = xyes])
|
||||
|
||||
dnl legacy fb support
|
||||
|
@ -1656,11 +1578,10 @@ AC_MSG_CHECKING([whether to build Xprint DDX])
|
|||
AC_MSG_RESULT([$XPRINT])
|
||||
|
||||
if test "x$XPRINT" = xyes; then
|
||||
PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau $PIXMAN])
|
||||
XPRINT_EXTENSIONS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
|
||||
XPRINT_LIBS="$DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS"
|
||||
AC_SUBST([XPRINT_CFLAGS])
|
||||
AC_SUBST([XPRINT_LIBS])
|
||||
PKG_CHECK_MODULES([XPRINTMODULES], [printproto x11 xfont $XDMCP_MODULES xau])
|
||||
XPRINT_CFLAGS="$XPRINTMODULES_CFLAGS"
|
||||
XPRINT_LIBS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $CWRAP_LIBS $XKB_LIB $XKB_STUB_LIB"
|
||||
XPRINT_SYS_LIBS="$XPRINTMODULES_LIBS"
|
||||
|
||||
xpconfigdir=$libdir/X11/xserver
|
||||
AC_SUBST([xpconfigdir])
|
||||
|
@ -1696,10 +1617,13 @@ if test "x$XPRINT" = xyes; then
|
|||
FREETYPE_LIBS=""
|
||||
FREETYPE_REQUIRES=""
|
||||
fi
|
||||
AC_SUBST(FREETYPE_LIBS)
|
||||
AC_SUBST(FREETYPE_CFLAGS)
|
||||
AC_SUBST(FREETYPE_REQUIRES)
|
||||
XPRINT_CFLAGS="$XPRINT_CFLAGS $FREETYPE_CFLAGS"
|
||||
XPRINT_SYS_LIBS="$XPRINT_SYS_LIBS $FREETYPE_LIBS"
|
||||
# end freetype support
|
||||
|
||||
AC_SUBST([XPRINT_CFLAGS])
|
||||
AC_SUBST([XPRINT_LIBS])
|
||||
AC_SUBST([XPRINT_SYS_LIBS])
|
||||
fi
|
||||
AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes])
|
||||
|
||||
|
@ -1713,7 +1637,7 @@ if test "x$XWIN" = xauto; then
|
|||
mingw*) XWIN="yes" ;;
|
||||
*) XWIN="no" ;;
|
||||
esac
|
||||
XWIN_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $OS_LIB $SHADOW_LIB"
|
||||
XWIN_LIBS="$FB_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB"
|
||||
AC_SUBST([XWIN_LIBS])
|
||||
fi
|
||||
AC_MSG_RESULT([$XWIN])
|
||||
|
@ -1732,11 +1656,12 @@ if test "x$XWIN" = xyes; then
|
|||
XWIN_SERVER_NAME=Xming
|
||||
AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location])
|
||||
AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets])
|
||||
XWIN_SYSTEM_LIBS=-lwinsock2
|
||||
XWIN_SYS_LIBS=-lwinsock2
|
||||
;;
|
||||
esac
|
||||
XWIN_SYS_LIBS="$XWIN_SYS_LIBS $(XWINMODULES_LIBS)"
|
||||
AC_SUBST(XWIN_SERVER_NAME)
|
||||
AC_SUBST(XWIN_SYSTEM_LIBS)
|
||||
AC_SUBST(XWIN_SYS_LIBS)
|
||||
|
||||
if test "x$DEBUGGING" = xyes; then
|
||||
AC_DEFINE(CYGDEBUG, 1, [Simple debug messages])
|
||||
|
@ -1773,10 +1698,71 @@ AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
|
|||
AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])
|
||||
|
||||
dnl Darwin / OS X DDX
|
||||
AM_CONDITIONAL(HAVE_X_PLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
|
||||
AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
|
||||
# Support for objc in autotools is minimal and not
|
||||
# documented.
|
||||
AC_MSG_CHECKING([whether to build XDarwin (Mac OS X) DDX])
|
||||
if test "x$XDARWIN" = xauto; then
|
||||
case $host_os in
|
||||
darwin*) XDARWIN="yes" ;;
|
||||
*) XDARWIN="no" ;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT([$XDARWIN])
|
||||
|
||||
if test "x$XDARWIN" = xyes; then
|
||||
if test "X$XQUARTZ" = Xauto; then
|
||||
AC_CACHE_CHECK([for Carbon framework],xorg_cv_Carbon_framework,[
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -framework Carbon"
|
||||
AC_LINK_IFELSE([char FSFindFolder();
|
||||
int main() {
|
||||
FSFindFolder();
|
||||
return 0;}
|
||||
],[xorg_cv_Carbon_framework=yes],
|
||||
[xorg_cv_Carbon_framework=no])
|
||||
LDFLAGS=$save_LDFLAGS])
|
||||
if test "X$xorg_cv_Carbon_framework" = Xyes; then
|
||||
AC_DEFINE([DARWIN_WITH_QUARTZ],[1],
|
||||
[Have Quartz])
|
||||
XQUARTZ=yes
|
||||
else
|
||||
XQUARTZ=no
|
||||
fi
|
||||
fi
|
||||
# glxAGL / glxCGL don't work yet
|
||||
# AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[
|
||||
# save_LDFLAGS=$LDFLAGS
|
||||
# LDFLAGS="$LDFLAGS -framework AGL"
|
||||
# AC_LINK_IFELSE([char aglEnable();
|
||||
#int main() {
|
||||
#aglEnable();
|
||||
#return 0;}
|
||||
# ],[xorg_cv_AGL_framework=yes],
|
||||
# [xorg_cv_AGL_framework=no])
|
||||
# LDFLAGS=$save_LDFLAGS
|
||||
# ])
|
||||
xorg_cv_AGL_framework=no
|
||||
DARWIN_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"
|
||||
AC_SUBST([DARWIN_LIBS])
|
||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
||||
CFLAGS="${CFLAGS} -D__DARWIN__"
|
||||
PLIST_VERSION_STRING=$PACKAGE_VERSION
|
||||
AC_SUBST([PLIST_VERSION_STRING])
|
||||
PLIST_VENDOR_WEB=$VENDOR_WEB
|
||||
AC_SUBST([PLIST_VENDOR_WEB])
|
||||
if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86Misc extension])
|
||||
XF86MISC=no
|
||||
fi
|
||||
if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86VidMode extension])
|
||||
XF86VIDMODE=no
|
||||
fi
|
||||
if test "x$DGA" = xyes || test "x$DGA" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling DGA extension])
|
||||
DGA=no
|
||||
fi
|
||||
fi
|
||||
# Support for objc in autotools is minimal and not documented.
|
||||
OBJC='$(CC)'
|
||||
OBJCLD='$(CCLD)'
|
||||
OBJCLINK='$(LINK)'
|
||||
|
@ -1787,7 +1773,10 @@ AC_SUBST([OBJCLINK])
|
|||
AC_SUBST([OBJCFLAGS])
|
||||
# internal, undocumented automake func follows :(
|
||||
_AM_DEPENDENCIES([OBJC])
|
||||
|
||||
AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
|
||||
AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
|
||||
AM_CONDITIONAL(XDARWIN, [test "x$XDARWIN" = xyes])
|
||||
AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
|
||||
dnl kdrive DDX
|
||||
|
||||
XEPHYR_LIBS=
|
||||
|
@ -1843,7 +1832,7 @@ if test "$KDRIVE" = yes; then
|
|||
if test x"$XSDL" = xyes; then
|
||||
# PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES)
|
||||
AC_DEFINE(XSDLSERVER,1,[Build Xsdl server])
|
||||
XSDL_LIBS="`sdl-config --libs` $XSERVER_LIBS"
|
||||
XSDL_LIBS="`sdl-config --libs`"
|
||||
XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS"
|
||||
fi
|
||||
|
||||
|
@ -1872,7 +1861,7 @@ if test "$KDRIVE" = yes; then
|
|||
|
||||
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
|
||||
|
||||
KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
|
||||
KDRIVE_PURE_LIBS="$FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"
|
||||
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
|
||||
case $host_os in
|
||||
*linux*)
|
||||
|
@ -1881,8 +1870,10 @@ if test "$KDRIVE" = yes; then
|
|||
;;
|
||||
esac
|
||||
KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
|
||||
KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
|
||||
KDRIVE_LIBS="$XSERVERLIBS_LIBS $KDRIVE_LOCAL_LIBS"
|
||||
KDRIVE_LOCAL_LIBS="$TSLIB_LIBS $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
|
||||
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
|
||||
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
|
||||
KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVERLIBS_LIBS"
|
||||
|
||||
# check if we can build Xephyr
|
||||
PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
|
||||
|
@ -1957,7 +1948,7 @@ AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
|
|||
if test x$XORGCFG = xyes ; then
|
||||
PKG_CHECK_MODULES([XORGCFG_DEP],
|
||||
[xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
|
||||
XORGCFG_DEP_CFLAGS="$XORGCFG_DEP_CFLAGS $PIXMAN_CFLAGS"
|
||||
XORGCFG_DEP_CFLAGS="$XORGCFG_DEP_CFLAGS"
|
||||
AC_CHECK_LIB([curses],[waddstr],
|
||||
[XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lcurses"; CURSES=yes],
|
||||
AC_CHECK_LIB([ncurses],[waddstr],
|
||||
|
@ -2009,9 +2000,6 @@ AC_SUBST([libdir exec_prefix prefix])
|
|||
# Man page sections - used in config utils & generating man pages
|
||||
XORG_MANPAGE_SECTIONS
|
||||
|
||||
# XORG in this case refers to the roll-up releases, not the Xorg DDX.
|
||||
XORG_RELEASE_VERSION
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
GL/Makefile
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
noinst_LTLIBRARIES = libdix.la libxpstubs.la
|
||||
|
||||
AM_CFLAGS = $(DIX_CFLAGS) \
|
||||
-DVENDOR_STRING=\""@VENDOR_STRING@"\" \
|
||||
-DVENDOR_NAME=\""@VENDOR_NAME@"\" \
|
||||
-DVENDOR_RELEASE="@VENDOR_RELEASE@"
|
||||
|
||||
libdix_la_SOURCES = \
|
||||
|
|
|
@ -854,6 +854,7 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers
|
|||
else
|
||||
bzero((char *)keyc->modifierMap, MAP_LENGTH);
|
||||
bzero((char *)keyc->down, DOWN_LENGTH);
|
||||
bzero((char *)keyc->postdown, DOWN_LENGTH);
|
||||
for (i = 0; i < 8; i++)
|
||||
keyc->modifierKeyCount[i] = 0;
|
||||
if (!SetKeySymsMap(&keyc->curKeySyms, pKeySyms) || !InitModMap(keyc))
|
||||
|
|
|
@ -80,6 +80,23 @@ GetMotionHistorySize(void)
|
|||
return MOTION_HISTORY_SIZE;
|
||||
}
|
||||
|
||||
static void
|
||||
set_key_down(DeviceIntPtr pDev, int key_code)
|
||||
{
|
||||
pDev->key->postdown[key_code >> 3] |= (1 << (key_code & 7));
|
||||
}
|
||||
|
||||
static void
|
||||
set_key_up(DeviceIntPtr pDev, int key_code)
|
||||
{
|
||||
pDev->key->postdown[key_code >> 3] &= ~(1 << (key_code & 7));
|
||||
}
|
||||
|
||||
static Bool
|
||||
key_is_down(DeviceIntPtr pDev, int key_code)
|
||||
{
|
||||
return pDev->key->postdown[key_code >> 3] >> (key_code & 7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate the motion history buffer.
|
||||
|
@ -414,17 +431,15 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
|||
case XK_Shift_Lock:
|
||||
if (type == KeyRelease)
|
||||
return 0;
|
||||
else if (type == KeyPress &&
|
||||
(pDev->key->down[key_code >> 3] & (key_code & 7)) & 1)
|
||||
type = KeyRelease;
|
||||
else if (type == KeyPress && key_is_down(pDev, key_code))
|
||||
type = KeyRelease;
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle core repeating, via press/release/press/release.
|
||||
* FIXME: In theory, if you're repeating with two keyboards in non-XKB,
|
||||
* you could get unbalanced events here. */
|
||||
if (type == KeyPress &&
|
||||
(((pDev->key->down[key_code >> 3] & (key_code & 7))) & 1)) {
|
||||
if (type == KeyPress && key_is_down(pDev, key_code)) {
|
||||
if (!pDev->kbdfeed->ctrl.autoRepeat ||
|
||||
pDev->key->modifierMap[key_code] ||
|
||||
!(pDev->kbdfeed->ctrl.autoRepeats[key_code >> 3]
|
||||
|
@ -449,6 +464,10 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
|||
events->u.keyButtonPointer.time = ms;
|
||||
events->u.u.type = type;
|
||||
events->u.u.detail = key_code;
|
||||
if (type == KeyPress)
|
||||
set_key_down(inputInfo.keyboard, key_code);
|
||||
else if (type == KeyRelease)
|
||||
set_key_up(inputInfo.keyboard, key_code);
|
||||
events++;
|
||||
}
|
||||
|
||||
|
@ -456,10 +475,14 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
|||
kbp->time = ms;
|
||||
kbp->deviceid = pDev->id;
|
||||
kbp->detail = key_code;
|
||||
if (type == KeyPress)
|
||||
if (type == KeyPress) {
|
||||
kbp->type = DeviceKeyPress;
|
||||
else if (type == KeyRelease)
|
||||
set_key_down(pDev, key_code);
|
||||
}
|
||||
else if (type == KeyRelease) {
|
||||
kbp->type = DeviceKeyRelease;
|
||||
set_key_up(pDev, key_code);
|
||||
}
|
||||
|
||||
events++;
|
||||
if (num_valuators) {
|
||||
|
|
|
@ -499,7 +499,7 @@ main(int argc, char *argv[], char *envp[])
|
|||
}
|
||||
|
||||
static int VendorRelease = VENDOR_RELEASE;
|
||||
static char *VendorString = VENDOR_STRING;
|
||||
static char *VendorString = VENDOR_NAME;
|
||||
|
||||
void
|
||||
SetVendorRelease(int release)
|
||||
|
|
|
@ -1494,7 +1494,7 @@ PatchUp:
|
|||
|
||||
REGION_NULL(pScreen, &exposed);
|
||||
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);
|
||||
}
|
||||
return error;
|
||||
|
|
|
@ -508,8 +508,7 @@ its parent process after it has set up the various connection schemes.
|
|||
\fIXdm\fP uses this feature to recognize when connecting to the server
|
||||
is possible.
|
||||
.SH FONTS
|
||||
The X server
|
||||
can obtain fonts from directories and/or from font servers.
|
||||
The X server can obtain fonts from directories and/or from font servers.
|
||||
The list of directories and font servers
|
||||
the X server uses when trying to open a font is controlled
|
||||
by the \fIfont path\fP.
|
||||
|
@ -517,8 +516,45 @@ by the \fIfont path\fP.
|
|||
The default font path is
|
||||
__default_font_path__ .
|
||||
.LP
|
||||
A special kind of directory can be specified using the the \fBcatalogue\fP:
|
||||
prefix. Directories specified this way can contain symlinks pointing to the
|
||||
real font directories. See the FONTPATH.D section for details.
|
||||
.LP
|
||||
The font path can be set with the \fB\-fp\fP option or by \fIxset\fP(1)
|
||||
after the server has started.
|
||||
.SH "FONTPATH.D"
|
||||
You can specify a special kind of font path in the form \fBcatalogue:<dir>\fR.
|
||||
The directory specified after the catalogue: prefix will be scanned for symlinks
|
||||
and each symlink destination will be added as a local fontfile FPE.
|
||||
.PP
|
||||
The symlink can be suffixed by attributes such as '\fBunscaled\fR', which
|
||||
will be passed through to the underlying fontfile FPE. The only exception is
|
||||
the newly introduced '\fBpri\fR' attribute, which will be used for ordering
|
||||
the font paths specified by the symlinks.
|
||||
|
||||
An example configuration:
|
||||
|
||||
.nf
|
||||
75dpi:unscaled:pri=20 \-> /usr/share/X11/fonts/75dpi
|
||||
ghostscript:pri=60 \-> /usr/share/fonts/default/ghostscript
|
||||
misc:unscaled:pri=10 \-> /usr/share/X11/fonts/misc
|
||||
type1:pri=40 \-> /usr/share/X11/fonts/Type1
|
||||
type1:pri=50 \-> /usr/share/fonts/default/Type1
|
||||
.fi
|
||||
|
||||
This will add /usr/share/X11/fonts/misc as the first FPE with the attribute
|
||||
'unscaled', second FPE will be /usr/share/X11/fonts/75dpi, also with
|
||||
the attribute unscaled etc. This is functionally equivalent to setting
|
||||
the following font path:
|
||||
|
||||
.nf
|
||||
/usr/share/X11/fonts/misc:unscaled,
|
||||
/usr/share/X11/fonts/75dpi:unscaled,
|
||||
/usr/share/X11/fonts/Type1,
|
||||
/usr/share/fonts/default/Type1,
|
||||
/usr/share/fonts/default/ghostscript
|
||||
.fi
|
||||
|
||||
.SH FILES
|
||||
.TP 30
|
||||
.I /etc/X\fBn\fP.hosts
|
||||
|
|
214
exa/exa.c
214
exa/exa.c
|
@ -43,6 +43,17 @@
|
|||
DevPrivateKey exaScreenPrivateKey = &exaScreenPrivateKey;
|
||||
DevPrivateKey exaPixmapPrivateKey = &exaPixmapPrivateKey;
|
||||
|
||||
static _X_INLINE void*
|
||||
ExaGetPixmapAddress(PixmapPtr p)
|
||||
{
|
||||
ExaPixmapPriv(p);
|
||||
|
||||
if (pExaPixmap->offscreen && pExaPixmap->fb_ptr)
|
||||
return pExaPixmap->fb_ptr;
|
||||
else
|
||||
return pExaPixmap->sys_ptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* exaGetPixmapOffset() returns the offset (in bytes) within the framebuffer of
|
||||
* the beginning of the given pixmap.
|
||||
|
@ -57,16 +68,9 @@ unsigned long
|
|||
exaGetPixmapOffset(PixmapPtr pPix)
|
||||
{
|
||||
ExaScreenPriv (pPix->drawable.pScreen);
|
||||
ExaPixmapPriv (pPix);
|
||||
void *ptr;
|
||||
|
||||
/* Return the offscreen pointer if we've hidden the data. */
|
||||
if (pPix->devPrivate.ptr == NULL)
|
||||
ptr = pExaPixmap->fb_ptr;
|
||||
else
|
||||
ptr = pPix->devPrivate.ptr;
|
||||
|
||||
return ((unsigned long)ptr - (unsigned long)pExaScr->info->memoryBase);
|
||||
return ((unsigned long)ExaGetPixmapAddress(pPix) -
|
||||
(unsigned long)pExaScr->info->memoryBase);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -185,7 +189,8 @@ exaDestroyPixmap (PixmapPtr pPixmap)
|
|||
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
||||
pPixmap->devKind = pExaPixmap->sys_pitch;
|
||||
}
|
||||
REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validReg);
|
||||
REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validSys);
|
||||
REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validFB);
|
||||
}
|
||||
return fbDestroyPixmap (pPixmap);
|
||||
}
|
||||
|
@ -239,6 +244,9 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
|||
pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
|
||||
pExaPixmap->sys_pitch = pPixmap->devKind;
|
||||
|
||||
pPixmap->devPrivate.ptr = NULL;
|
||||
pExaPixmap->offscreen = FALSE;
|
||||
|
||||
pExaPixmap->fb_ptr = NULL;
|
||||
if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1)
|
||||
pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8;
|
||||
|
@ -266,11 +274,33 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
|||
DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
|
||||
|
||||
/* None of the pixmap bits are valid initially */
|
||||
REGION_NULL(pScreen, &pExaPixmap->validReg);
|
||||
REGION_NULL(pScreen, &pExaPixmap->validSys);
|
||||
REGION_NULL(pScreen, &pExaPixmap->validFB);
|
||||
|
||||
return pPixmap;
|
||||
}
|
||||
|
||||
static Bool
|
||||
exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
|
||||
int bitsPerPixel, int devKind, pointer pPixData)
|
||||
{
|
||||
ExaScreenPrivPtr pExaScr;
|
||||
ExaPixmapPrivPtr pExaPixmap;
|
||||
|
||||
if (!pPixmap)
|
||||
return FALSE;
|
||||
|
||||
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||
|
||||
if (pExaPixmap)
|
||||
pExaPixmap->sys_ptr = pPixData;
|
||||
|
||||
pExaScr = ExaGetScreenPriv(pPixmap->drawable.pScreen);
|
||||
|
||||
return pExaScr->SavedModifyPixmapHeader(pPixmap, width, height, depth,
|
||||
bitsPerPixel, devKind, pPixData);
|
||||
}
|
||||
|
||||
/**
|
||||
* exaPixmapIsOffscreen() is used to determine if a pixmap is in offscreen
|
||||
* memory, meaning that acceleration could probably be done to it, and that it
|
||||
|
@ -288,18 +318,25 @@ exaPixmapIsOffscreen(PixmapPtr p)
|
|||
{
|
||||
ScreenPtr pScreen = p->drawable.pScreen;
|
||||
ExaScreenPriv(pScreen);
|
||||
ExaPixmapPriv(p);
|
||||
void *save_ptr;
|
||||
Bool ret;
|
||||
|
||||
/* If the devPrivate.ptr is NULL, it's offscreen but we've hidden the data.
|
||||
*/
|
||||
if (p->devPrivate.ptr == NULL)
|
||||
return TRUE;
|
||||
save_ptr = p->devPrivate.ptr;
|
||||
|
||||
if (!save_ptr && pExaPixmap)
|
||||
p->devPrivate.ptr = ExaGetPixmapAddress(p);
|
||||
|
||||
if (pExaScr->info->PixmapIsOffscreen)
|
||||
return pExaScr->info->PixmapIsOffscreen(p);
|
||||
ret = pExaScr->info->PixmapIsOffscreen(p);
|
||||
else
|
||||
ret = ((unsigned long) ((CARD8 *) p->devPrivate.ptr -
|
||||
(CARD8 *) pExaScr->info->memoryBase) <
|
||||
pExaScr->info->memorySize);
|
||||
|
||||
return ((unsigned long) ((CARD8 *) p->devPrivate.ptr -
|
||||
(CARD8 *) pExaScr->info->memoryBase) <
|
||||
pExaScr->info->memorySize);
|
||||
p->devPrivate.ptr = save_ptr;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -328,33 +365,24 @@ exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* exaPrepareAccess() is EXA's wrapper for the driver's PrepareAccess() handler.
|
||||
*
|
||||
* It deals with waiting for synchronization with the card, determining if
|
||||
* PrepareAccess() is necessary, and working around PrepareAccess() failure.
|
||||
*/
|
||||
void
|
||||
exaPrepareAccess(DrawablePtr pDrawable, int index)
|
||||
ExaDoPrepareAccess(DrawablePtr pDrawable, int index)
|
||||
{
|
||||
ScreenPtr pScreen = pDrawable->pScreen;
|
||||
ExaScreenPriv (pScreen);
|
||||
PixmapPtr pPixmap;
|
||||
|
||||
pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||
|
||||
if (exaPixmapIsOffscreen (pPixmap))
|
||||
exaWaitSync (pDrawable->pScreen);
|
||||
else
|
||||
return;
|
||||
PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||
Bool offscreen = exaPixmapIsOffscreen(pPixmap);
|
||||
|
||||
/* Unhide pixmap pointer */
|
||||
if (pPixmap->devPrivate.ptr == NULL) {
|
||||
ExaPixmapPriv (pPixmap);
|
||||
|
||||
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
|
||||
pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
|
||||
}
|
||||
|
||||
if (!offscreen)
|
||||
return;
|
||||
|
||||
exaWaitSync (pDrawable->pScreen);
|
||||
|
||||
if (pExaScr->info->PrepareAccess == NULL)
|
||||
return;
|
||||
|
||||
|
@ -366,6 +394,33 @@ exaPrepareAccess(DrawablePtr pDrawable, int index)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
exaPrepareAccessReg(DrawablePtr pDrawable, int index, RegionPtr pReg)
|
||||
{
|
||||
ExaMigrationRec pixmaps[1];
|
||||
|
||||
pixmaps[0].as_dst = index == EXA_PREPARE_DEST;
|
||||
pixmaps[0].as_src = index != EXA_PREPARE_DEST;
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
||||
pixmaps[0].pReg = pReg;
|
||||
|
||||
exaDoMigration(pixmaps, 1, FALSE);
|
||||
|
||||
ExaDoPrepareAccess(pDrawable, index);
|
||||
}
|
||||
|
||||
/**
|
||||
* exaPrepareAccess() is EXA's wrapper for the driver's PrepareAccess() handler.
|
||||
*
|
||||
* It deals with waiting for synchronization with the card, determining if
|
||||
* PrepareAccess() is necessary, and working around PrepareAccess() failure.
|
||||
*/
|
||||
void
|
||||
exaPrepareAccess(DrawablePtr pDrawable, int index)
|
||||
{
|
||||
exaPrepareAccessReg(pDrawable, index, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* exaFinishAccess() is EXA's wrapper for the driver's FinishAccess() handler.
|
||||
*
|
||||
|
@ -376,18 +431,13 @@ exaFinishAccess(DrawablePtr pDrawable, int index)
|
|||
{
|
||||
ScreenPtr pScreen = pDrawable->pScreen;
|
||||
ExaScreenPriv (pScreen);
|
||||
PixmapPtr pPixmap;
|
||||
ExaPixmapPrivPtr pExaPixmap;
|
||||
|
||||
pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||
|
||||
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||
PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||
ExaPixmapPriv (pPixmap);
|
||||
|
||||
/* Rehide pixmap pointer if we're doing that. */
|
||||
if (pExaPixmap != NULL && pExaScr->hideOffscreenPixmapData &&
|
||||
pExaPixmap->fb_ptr == pPixmap->devPrivate.ptr)
|
||||
if (pExaPixmap)
|
||||
{
|
||||
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
|
||||
pPixmap->devPrivate.ptr = NULL;
|
||||
}
|
||||
|
||||
if (pExaScr->info->FinishAccess == NULL)
|
||||
|
@ -451,11 +501,9 @@ exaValidateGC (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
|||
if (!pGC->tileIsPixel && FbEvenTile (pGC->tile.pixmap->drawable.width *
|
||||
pDrawable->bitsPerPixel))
|
||||
{
|
||||
/* XXX This fixes corruption with tiled pixmaps, but may just be a
|
||||
* workaround for broken drivers
|
||||
*/
|
||||
exaMoveOutPixmap(pGC->tile.pixmap);
|
||||
exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
fbPadPixmap (pGC->tile.pixmap);
|
||||
exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
exaPixmapDirty(pGC->tile.pixmap, 0, 0,
|
||||
pGC->tile.pixmap->drawable.width,
|
||||
pGC->tile.pixmap->drawable.height);
|
||||
|
@ -466,7 +514,9 @@ exaValidateGC (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
|||
changes &= ~GCTile;
|
||||
}
|
||||
|
||||
exaPrepareAccessGC(pGC);
|
||||
fbValidateGC (pGC, changes, pDrawable);
|
||||
exaFinishAccessGC(pGC);
|
||||
|
||||
pGC->ops = (GCOps *) &exaOps;
|
||||
}
|
||||
|
@ -496,6 +546,47 @@ exaCreateGC (GCPtr pGC)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
exaPrepareAccessWindow(WindowPtr pWin)
|
||||
{
|
||||
if (pWin->backgroundState == BackgroundPixmap)
|
||||
exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
|
||||
if (pWin->borderIsPixel == FALSE)
|
||||
exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
|
||||
void
|
||||
exaFinishAccessWindow(WindowPtr pWin)
|
||||
{
|
||||
if (pWin->backgroundState == BackgroundPixmap)
|
||||
exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
|
||||
if (pWin->borderIsPixel == FALSE)
|
||||
exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
|
||||
static Bool
|
||||
exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
||||
{
|
||||
Bool ret;
|
||||
|
||||
exaPrepareAccessWindow(pWin);
|
||||
ret = fbChangeWindowAttributes(pWin, mask);
|
||||
exaFinishAccessWindow(pWin);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static RegionPtr
|
||||
exaBitmapToRegion(PixmapPtr pPix)
|
||||
{
|
||||
RegionPtr ret;
|
||||
exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC);
|
||||
ret = fbPixmapToRegion(pPix);
|
||||
exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's
|
||||
* screen private, before calling down to the next CloseSccreen.
|
||||
|
@ -512,11 +603,11 @@ exaCloseScreen(int i, ScreenPtr pScreen)
|
|||
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
||||
pScreen->GetImage = pExaScr->SavedGetImage;
|
||||
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
||||
pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground;
|
||||
pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder;
|
||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||
pScreen->ChangeWindowAttributes = pExaScr->SavedChangeWindowAttributes;
|
||||
pScreen->BitmapToRegion = pExaScr->SavedBitmapToRegion;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
ps->Composite = pExaScr->SavedComposite;
|
||||
|
@ -648,27 +739,24 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
pScreen->GetImage = exaGetImage;
|
||||
|
||||
pExaScr->SavedGetSpans = pScreen->GetSpans;
|
||||
pScreen->GetSpans = exaGetSpans;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
|
||||
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = exaCopyWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
||||
pExaScr->SavedChangeWindowAttributes = pScreen->ChangeWindowAttributes;
|
||||
pScreen->ChangeWindowAttributes = exaChangeWindowAttributes;
|
||||
|
||||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
||||
pExaScr->SavedBitmapToRegion = pScreen->BitmapToRegion;
|
||||
pScreen->BitmapToRegion = exaBitmapToRegion;
|
||||
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
pExaScr->SavedComposite = ps->Composite;
|
||||
ps->Composite = exaComposite;
|
||||
|
||||
pExaScr->SavedRasterizeTrapezoid = ps->RasterizeTrapezoid;
|
||||
ps->RasterizeTrapezoid = exaRasterizeTrapezoid;
|
||||
|
||||
pExaScr->SavedAddTriangles = ps->AddTriangles;
|
||||
ps->AddTriangles = exaAddTriangles;
|
||||
pExaScr->SavedTriangles = ps->Triangles;
|
||||
ps->Triangles = exaTriangles;
|
||||
|
||||
pExaScr->SavedGlyphs = ps->Glyphs;
|
||||
ps->Glyphs = exaGlyphs;
|
||||
|
@ -703,6 +791,8 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
||||
pScreen->DestroyPixmap = exaDestroyPixmap;
|
||||
|
||||
pExaScr->SavedModifyPixmapHeader = pScreen->ModifyPixmapHeader;
|
||||
pScreen->ModifyPixmapHeader = exaModifyPixmapHeader;
|
||||
LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %d bytes\n",
|
||||
pScreen->myNum,
|
||||
pExaScr->info->memorySize - pExaScr->info->offScreenBase);
|
||||
|
|
675
exa/exa_accel.c
675
exa/exa_accel.c
|
@ -55,13 +55,13 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
|||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||
pixmaps[0].pReg = NULL;
|
||||
|
||||
if (pExaScr->swappedOut ||
|
||||
pGC->fillStyle != FillSolid ||
|
||||
pPixmap->drawable.width > pExaScr->info->maxX ||
|
||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
||||
{
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||
return;
|
||||
} else {
|
||||
|
@ -74,7 +74,6 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
|||
pGC->planemask,
|
||||
pGC->fgPixel))
|
||||
{
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||
return;
|
||||
}
|
||||
|
@ -140,10 +139,11 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
|||
|
||||
static Bool
|
||||
exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||
int w, int h, int leftPad, int format, char *bits, int src_stride)
|
||||
int w, int h, int format, char *bits, int src_stride)
|
||||
{
|
||||
ExaScreenPriv (pDrawable->pScreen);
|
||||
PixmapPtr pPix;
|
||||
PixmapPtr pPix = exaGetDrawablePixmap (pDrawable);
|
||||
ExaPixmapPriv(pPix);
|
||||
ExaMigrationRec pixmaps[1];
|
||||
RegionPtr pClip;
|
||||
BoxPtr pbox;
|
||||
|
@ -152,25 +152,28 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
int bpp = pDrawable->bitsPerPixel;
|
||||
Bool access_prepared = FALSE;
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
||||
|
||||
/* Don't bother with under 8bpp, XYPixmaps. */
|
||||
if (format != ZPixmap || bpp < 8)
|
||||
goto migrate_and_fallback;
|
||||
return FALSE;
|
||||
|
||||
/* Only accelerate copies: no rop or planemask. */
|
||||
if (!EXA_PM_IS_SOLID(pDrawable, pGC->planemask) || pGC->alu != GXcopy)
|
||||
goto migrate_and_fallback;
|
||||
return FALSE;
|
||||
|
||||
if (pExaScr->swappedOut)
|
||||
goto fallback;
|
||||
return FALSE;
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pPix;
|
||||
pixmaps[0].pReg = DamagePendingRegion(pExaPixmap->pDamage);
|
||||
exaDoMigration (pixmaps, 1, TRUE);
|
||||
|
||||
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
||||
|
||||
if (!pPix || !pExaScr->info->UploadToScreen)
|
||||
return FALSE;
|
||||
|
||||
x += pDrawable->x;
|
||||
y += pDrawable->y;
|
||||
|
||||
|
@ -199,10 +202,8 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
continue;
|
||||
|
||||
src = bits + (y1 - y) * src_stride + (x1 - x) * (bpp / 8);
|
||||
ok = (pPix && pExaScr->info->UploadToScreen) ?
|
||||
pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff,
|
||||
x2 - x1, y2 - y1, src, src_stride) :
|
||||
FALSE;
|
||||
ok = pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff,
|
||||
x2 - x1, y2 - y1, src, src_stride);
|
||||
/* If we fail to accelerate the upload, fall back to using unaccelerated
|
||||
* fb calls.
|
||||
*/
|
||||
|
@ -213,7 +214,7 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
int dstXoff, dstYoff;
|
||||
|
||||
if (!access_prepared) {
|
||||
exaPrepareAccess(pDrawable, EXA_PREPARE_DEST);
|
||||
ExaDoPrepareAccess(pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
access_prepared = TRUE;
|
||||
}
|
||||
|
@ -231,54 +232,118 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
y2 - y1,
|
||||
GXcopy, FB_ALLONES, dstBpp);
|
||||
}
|
||||
|
||||
if (access_prepared)
|
||||
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
exaPixmapDirty(pixmaps[0].pPix, x1 + xoff, y1 + yoff, x2 + xoff, y2 + yoff);
|
||||
}
|
||||
|
||||
if (access_prepared)
|
||||
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
||||
else
|
||||
exaMarkSync(pDrawable->pScreen);
|
||||
|
||||
return TRUE;
|
||||
|
||||
migrate_and_fallback:
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
|
||||
fallback:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
exaPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||
int w, int h, int leftPad, int format, char *bits)
|
||||
{
|
||||
if (!exaDoPutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits,
|
||||
PixmapBytePad(w, pDrawable->depth)))
|
||||
ExaCheckPutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format,
|
||||
bits);
|
||||
}
|
||||
|
||||
#ifdef MITSHM
|
||||
|
||||
static void
|
||||
static Bool
|
||||
exaDoShmPutImage(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, char *data)
|
||||
{
|
||||
int src_stride = PixmapBytePad(w, depth);
|
||||
|
||||
if (exaDoPutImage(pDrawable, pGC, depth, dx, dy, sw, sh, format, data +
|
||||
sy * src_stride + sx * BitsPerPixel(depth) / 8,
|
||||
src_stride))
|
||||
return TRUE;
|
||||
|
||||
if (format == ZPixmap)
|
||||
{
|
||||
PixmapPtr pPixmap;
|
||||
|
||||
pPixmap = GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth,
|
||||
BitsPerPixel(depth), PixmapBytePad(w, depth), (pointer)data);
|
||||
if (!pPixmap)
|
||||
return FALSE;
|
||||
|
||||
if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
|
||||
pGC->alu))
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
else
|
||||
ExaDoPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
fbCopyArea((DrawablePtr)pPixmap, pDrawable, pGC, sx, sy, sw, sh, dx, dy);
|
||||
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
FreeScratchPixmapHeader(pPixmap);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* The actual ShmPutImage isn't wrapped by the damage layer, so we need to
|
||||
* inform any interested parties of the damage incurred to the drawable.
|
||||
*
|
||||
* We also need to set the pending damage to ensure correct migration in all
|
||||
* cases.
|
||||
*/
|
||||
void
|
||||
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,
|
||||
char *data)
|
||||
{
|
||||
int src_stride = PixmapBytePad(w, depth);
|
||||
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
||||
ExaPixmapPriv(pPixmap);
|
||||
BoxRec box = { .x1 = pDrawable->x + dx, .y1 = pDrawable->y + dy,
|
||||
.x2 = pDrawable->x + dx + sw, .y2 = pDrawable->y + dy + sh };
|
||||
RegionRec region;
|
||||
int xoff, yoff;
|
||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||
|
||||
if (exaDoPutImage(pDrawable, pGC, depth, dx, dy, sw, sh, 0, format, data +
|
||||
sy * src_stride + sx * BitsPerPixel(depth) / 8,
|
||||
src_stride))
|
||||
return;
|
||||
REGION_INIT(pScreen, ®ion, &box, 1);
|
||||
|
||||
fbShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy,
|
||||
data);
|
||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||
|
||||
REGION_TRANSLATE(pScreen, ®ion, xoff, yoff);
|
||||
REGION_UNION(pScreen, pending_damage, pending_damage, ®ion);
|
||||
|
||||
if (!exaDoShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh,
|
||||
dx, dy, data)) {
|
||||
if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
|
||||
pGC->alu))
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
else
|
||||
ExaDoPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
fbShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy,
|
||||
data);
|
||||
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
||||
}
|
||||
|
||||
REGION_TRANSLATE(pScreen, ®ion, -xoff, -yoff);
|
||||
DamageDamageRegion(pDrawable, ®ion);
|
||||
|
||||
REGION_UNINIT(pScreen, ®ion);
|
||||
}
|
||||
|
||||
ShmFuncs exaShmFuncs = { NULL, exaShmPutImage };
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
exaPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||
int w, int h, int leftPad, int format, char *bits)
|
||||
{
|
||||
#ifdef MITSHM
|
||||
if (!exaDoShmPutImage(pDrawable, pGC, depth, format, w, h, 0, 0, w, h, x, y,
|
||||
bits))
|
||||
#else
|
||||
if (!exaDoPutImage(pDrawable, pGC, depth, x, y, w, h, format, bits,
|
||||
PixmapBytePad(w, pDrawable->depth)))
|
||||
#endif
|
||||
ExaCheckPutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format,
|
||||
bits);
|
||||
}
|
||||
|
||||
static Bool inline
|
||||
exaCopyNtoNTwoDir (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
||||
GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy)
|
||||
|
@ -393,8 +458,6 @@ exaCopyNtoNTwoDir (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
|||
dst_off_y + pbox->y1 + i,
|
||||
pbox->x2 - pbox->x1, 1);
|
||||
}
|
||||
exaPixmapDirty(pDstPixmap, dst_off_x + pbox->x1, dst_off_y + pbox->y1,
|
||||
dst_off_x + pbox->x2, dst_off_y + pbox->y2);
|
||||
}
|
||||
if (dirsetup != 0)
|
||||
pExaScr->info->DoneCopy(pDstPixmap);
|
||||
|
@ -420,14 +483,49 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
|||
int src_off_x, src_off_y;
|
||||
int dst_off_x, dst_off_y;
|
||||
ExaMigrationRec pixmaps[2];
|
||||
Bool fallback = FALSE;
|
||||
RegionPtr region = NULL;
|
||||
|
||||
pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
|
||||
pDstPixmap = exaGetDrawablePixmap (pDstDrawable);
|
||||
|
||||
exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y);
|
||||
exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y);
|
||||
|
||||
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
|
||||
pGC->fillStyle, pGC->alu)) {
|
||||
xRectangle *rects = ALLOCATE_LOCAL(nbox * sizeof(xRectangle));
|
||||
|
||||
if (rects) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nbox; i++) {
|
||||
rects[i].x = pbox[i].x1 + dst_off_x;
|
||||
rects[i].y = pbox[i].y1 + dst_off_y;
|
||||
rects[i].width = pbox[i].x2 - pbox[i].x1;
|
||||
rects[i].height = pbox[i].y2 - pbox[i].y1;
|
||||
}
|
||||
|
||||
region = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED);
|
||||
DEALLOCATE_LOCAL(rects);
|
||||
|
||||
if (region) {
|
||||
src_off_x -= dst_off_x;
|
||||
src_off_y -= dst_off_y;
|
||||
dst_off_x = dst_off_y = 0;
|
||||
pbox = REGION_RECTS(region);
|
||||
nbox = REGION_NUM_RECTS(region);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pDstPixmap = exaGetDrawablePixmap (pDstDrawable);
|
||||
pixmaps[0].pPix = pDstPixmap;
|
||||
pixmaps[0].pReg = region;
|
||||
pixmaps[1].as_dst = FALSE;
|
||||
pixmaps[1].as_src = TRUE;
|
||||
pixmaps[1].pPix = pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
|
||||
pixmaps[1].pPix = pSrcPixmap;
|
||||
pixmaps[1].pReg = NULL;
|
||||
|
||||
/* Respect maxX/maxY in a trivial way: don't set up drawing when we might
|
||||
* violate the limits. The proper solution would be a temporary pixmap
|
||||
|
@ -438,64 +536,60 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
|||
pDstPixmap->drawable.width > pExaScr->info->maxX ||
|
||||
pDstPixmap->drawable.height > pExaScr->info->maxY)
|
||||
{
|
||||
fallback = TRUE;
|
||||
goto fallback;
|
||||
} else {
|
||||
exaDoMigration (pixmaps, 2, TRUE);
|
||||
}
|
||||
|
||||
/* Mixed directions must be handled specially if the card is lame */
|
||||
if (!fallback && (pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) &&
|
||||
if ((pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) &&
|
||||
reverse != upsidedown) {
|
||||
if (exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox,
|
||||
dx, dy))
|
||||
return;
|
||||
fallback = TRUE;
|
||||
goto out;
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
|
||||
pDstPixmap = exaGetDrawablePixmap (pDstDrawable);
|
||||
|
||||
exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y);
|
||||
exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y);
|
||||
|
||||
if (fallback || !exaPixmapIsOffscreen(pSrcPixmap) ||
|
||||
if (!exaPixmapIsOffscreen(pSrcPixmap) ||
|
||||
!exaPixmapIsOffscreen(pDstPixmap) ||
|
||||
!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1,
|
||||
upsidedown ? -1 : 1,
|
||||
pGC ? pGC->alu : GXcopy,
|
||||
pGC ? pGC->planemask : FB_ALLONES)) {
|
||||
fallback = TRUE;
|
||||
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable,
|
||||
exaDrawableLocation(pSrcDrawable),
|
||||
exaDrawableLocation(pDstDrawable)));
|
||||
exaDoMigration (pixmaps, 2, FALSE);
|
||||
exaPrepareAccess (pDstDrawable, EXA_PREPARE_DEST);
|
||||
exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
||||
fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC,
|
||||
pbox, nbox, dx, dy, reverse, upsidedown,
|
||||
bitplane, closure);
|
||||
exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
||||
exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST);
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
while (nbox--)
|
||||
{
|
||||
if (!fallback)
|
||||
(*pExaScr->info->Copy) (pDstPixmap,
|
||||
pbox->x1 + dx + src_off_x,
|
||||
pbox->y1 + dy + src_off_y,
|
||||
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
|
||||
exaPixmapDirty (pDstPixmap, pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
||||
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
||||
(*pExaScr->info->Copy) (pDstPixmap,
|
||||
pbox->x1 + dx + src_off_x,
|
||||
pbox->y1 + dy + src_off_y,
|
||||
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
|
||||
pbox++;
|
||||
}
|
||||
|
||||
if (fallback)
|
||||
return;
|
||||
|
||||
(*pExaScr->info->DoneCopy) (pDstPixmap);
|
||||
exaMarkSync (pDstDrawable->pScreen);
|
||||
|
||||
goto out;
|
||||
|
||||
fallback:
|
||||
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable,
|
||||
exaDrawableLocation(pSrcDrawable),
|
||||
exaDrawableLocation(pDstDrawable)));
|
||||
exaPrepareAccessReg (pDstDrawable, EXA_PREPARE_DEST, region);
|
||||
exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
||||
fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse,
|
||||
upsidedown, bitplane, closure);
|
||||
exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
||||
exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
out:
|
||||
if (region) {
|
||||
REGION_UNINIT(pScreen, region);
|
||||
REGION_DESTROY(pScreen, region);
|
||||
}
|
||||
}
|
||||
|
||||
RegionPtr
|
||||
|
@ -688,7 +782,8 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
|||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pPixmap;
|
||||
|
||||
pixmaps[0].pReg = NULL;
|
||||
|
||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||
|
||||
if (pExaScr->swappedOut ||
|
||||
|
@ -731,15 +826,6 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
|||
pGC->fgPixel))
|
||||
{
|
||||
fallback:
|
||||
if (pGC->fillStyle == FillTiled && !pGC->tileIsPixel) {
|
||||
pixmaps[1].as_dst = FALSE;
|
||||
pixmaps[1].as_src = TRUE;
|
||||
pixmaps[1].pPix = pGC->tile.pixmap;
|
||||
exaDoMigration (pixmaps, 2, FALSE);
|
||||
} else {
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
}
|
||||
|
||||
ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect);
|
||||
goto out;
|
||||
}
|
||||
|
@ -818,100 +904,10 @@ fallback:
|
|||
exaMarkSync(pDrawable->pScreen);
|
||||
|
||||
out:
|
||||
REGION_UNINIT(pScreen, pReg);
|
||||
REGION_DESTROY(pScreen, pReg);
|
||||
}
|
||||
|
||||
static void
|
||||
exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||
RegionPtr pClip,
|
||||
FbBits pm,
|
||||
FbBits fg,
|
||||
int x1,
|
||||
int y1,
|
||||
int x2,
|
||||
int y2)
|
||||
{
|
||||
ExaScreenPriv (pDrawable->pScreen);
|
||||
PixmapPtr pPixmap;
|
||||
BoxPtr pbox;
|
||||
int nbox;
|
||||
int xoff, yoff;
|
||||
int partX1, partX2, partY1, partY2;
|
||||
ExaMigrationRec pixmaps[1];
|
||||
Bool fallback = FALSE;
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||
|
||||
if (pExaScr->swappedOut ||
|
||||
pPixmap->drawable.width > pExaScr->info->maxX ||
|
||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
||||
{
|
||||
fallback = TRUE;
|
||||
} else {
|
||||
exaDoMigration (pixmaps, 1, TRUE);
|
||||
}
|
||||
|
||||
exaGetDrawableDeltas (pDrawable, pPixmap, &xoff, &yoff);
|
||||
|
||||
if (fallback || !exaPixmapIsOffscreen(pPixmap) ||
|
||||
!(*pExaScr->info->PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
||||
{
|
||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable,
|
||||
exaDrawableLocation(pDrawable)));
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
fallback = TRUE;
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
fg = fbReplicatePixel (fg, pDrawable->bitsPerPixel);
|
||||
fbSolidBoxClipped (pDrawable, pClip, x1, y1, x2, y2,
|
||||
fbAnd (GXcopy, fg, pm),
|
||||
fbXor (GXcopy, fg, pm));
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
}
|
||||
for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip);
|
||||
nbox--;
|
||||
pbox++)
|
||||
{
|
||||
partX1 = pbox->x1;
|
||||
if (partX1 < x1)
|
||||
partX1 = x1;
|
||||
|
||||
partX2 = pbox->x2;
|
||||
if (partX2 > x2)
|
||||
partX2 = x2;
|
||||
|
||||
if (partX2 <= partX1)
|
||||
continue;
|
||||
|
||||
partY1 = pbox->y1;
|
||||
if (partY1 < y1)
|
||||
partY1 = y1;
|
||||
|
||||
partY2 = pbox->y2;
|
||||
if (partY2 > y2)
|
||||
partY2 = y2;
|
||||
|
||||
if (partY2 <= partY1)
|
||||
continue;
|
||||
|
||||
if (!fallback) {
|
||||
(*pExaScr->info->Solid) (pPixmap,
|
||||
partX1 + xoff, partY1 + yoff,
|
||||
partX2 + xoff, partY2 + yoff);
|
||||
}
|
||||
|
||||
exaPixmapDirty (pPixmap, partX1 + xoff, partY1 + yoff, partX2 + xoff,
|
||||
partY2 + yoff);
|
||||
}
|
||||
|
||||
if (fallback)
|
||||
return;
|
||||
|
||||
(*pExaScr->info->DoneSolid) (pPixmap);
|
||||
exaMarkSync(pDrawable->pScreen);
|
||||
}
|
||||
|
||||
static void
|
||||
exaImageGlyphBlt (DrawablePtr pDrawable,
|
||||
GCPtr pGC,
|
||||
|
@ -928,7 +924,6 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
int gWidth, gHeight; /* width and height of glyph */
|
||||
FbStride gStride; /* stride of glyph */
|
||||
Bool opaque;
|
||||
int n;
|
||||
int gx, gy;
|
||||
void (*glyph) (FbBits *,
|
||||
FbStride,
|
||||
|
@ -942,37 +937,33 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
int dstBpp;
|
||||
int dstXoff, dstYoff;
|
||||
FbBits depthMask;
|
||||
Bool fallback;
|
||||
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
||||
ExaPixmapPriv(pPixmap);
|
||||
ExaMigrationRec pixmaps[1];
|
||||
int xBack, widthBack, yBack, heightBack;
|
||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||
BoxRec extents = *REGION_EXTENTS(pScreen, pending_damage);
|
||||
int xoff, yoff;
|
||||
|
||||
for (ppci = ppciInit, n = nglyph, widthBack = 0; n; n--)
|
||||
widthBack += (*ppci++)->metrics.characterWidth;
|
||||
|
||||
xBack = x;
|
||||
if (widthBack < 0)
|
||||
{
|
||||
xBack += widthBack;
|
||||
widthBack = -widthBack;
|
||||
}
|
||||
yBack = y - FONTASCENT(pGC->font);
|
||||
heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font);
|
||||
|
||||
if (xBack >= pDrawable->width || yBack >= pDrawable->height ||
|
||||
(xBack + widthBack) <= 0 || (yBack + heightBack) <= 0)
|
||||
if (extents.x1 >= extents.x2 || extents.y1 >= extents.y2)
|
||||
return;
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = pPixmap;
|
||||
|
||||
depthMask = FbFullMask(pDrawable->depth);
|
||||
if ((pGC->planemask & depthMask) != depthMask)
|
||||
fallback = (pGC->planemask & depthMask) != depthMask;
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pPixmap;
|
||||
pixmaps[0].pReg = fallback ? NULL : pending_damage;
|
||||
|
||||
exaDoMigration(pixmaps, 1, FALSE);
|
||||
|
||||
if (fallback)
|
||||
{
|
||||
exaDoMigration(pixmaps, 1, FALSE);
|
||||
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
|
||||
goto damage;
|
||||
return;
|
||||
}
|
||||
|
||||
glyph = NULL;
|
||||
switch (pDrawable->bitsPerPixel) {
|
||||
case 8: glyph = fbGlyph8; break;
|
||||
|
@ -983,8 +974,14 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
|
||||
x += pDrawable->x;
|
||||
y += pDrawable->y;
|
||||
xBack += pDrawable->x;
|
||||
yBack += pDrawable->y;
|
||||
|
||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||
extents.x1 -= xoff;
|
||||
extents.x2 -= xoff;
|
||||
extents.y1 -= yoff;
|
||||
extents.y2 -= yoff;
|
||||
|
||||
exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pixmaps[0].pReg);
|
||||
|
||||
if (TERMINALFONT (pGC->font) && !glyph)
|
||||
{
|
||||
|
@ -992,20 +989,22 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
}
|
||||
else
|
||||
{
|
||||
exaSolidBoxClipped (pDrawable,
|
||||
fbGetCompositeClip(pGC),
|
||||
pGC->planemask,
|
||||
pGC->bgPixel,
|
||||
xBack,
|
||||
yBack,
|
||||
xBack + widthBack,
|
||||
yBack + heightBack);
|
||||
FbBits fg = fbReplicatePixel (pGC->bgPixel, pDrawable->bitsPerPixel);
|
||||
|
||||
fbSolidBoxClipped (pDrawable,
|
||||
fbGetCompositeClip(pGC),
|
||||
extents.x1,
|
||||
extents.y1,
|
||||
extents.x2,
|
||||
extents.y2,
|
||||
fbAnd (GXcopy, fg, pGC->planemask),
|
||||
fbXor (GXcopy, fg, pGC->planemask));
|
||||
|
||||
opaque = FALSE;
|
||||
}
|
||||
|
||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
||||
exaDoMigration(pixmaps, 1, FALSE);
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
exaPrepareAccessGC (pGC);
|
||||
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
|
@ -1018,9 +1017,9 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
gx = x + pci->metrics.leftSideBearing;
|
||||
gy = y - pci->metrics.ascent;
|
||||
|
||||
if (!gWidth || !gHeight || (gx + gWidth) <= xBack ||
|
||||
(gy + gHeight) <= yBack || gx >= (xBack + widthBack) ||
|
||||
gy >= (yBack + heightBack))
|
||||
if (!gWidth || !gHeight || (gx + gWidth) <= extents.x1 ||
|
||||
(gy + gHeight) <= extents.y1 || gx >= extents.x2 ||
|
||||
gy >= extents.y2)
|
||||
continue;
|
||||
|
||||
pglyph = FONTGLYPHBITS(pglyphBase, pci);
|
||||
|
@ -1043,11 +1042,6 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
}
|
||||
exaFinishAccessGC (pGC);
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
damage:
|
||||
exaGetDrawableDeltas(pDrawable, pPixmap, &dstXoff, &dstYoff);
|
||||
exaPixmapDirty(pPixmap, xBack + dstXoff, yBack + dstYoff,
|
||||
xBack + dstXoff + widthBack, yBack + dstYoff + heightBack);
|
||||
}
|
||||
|
||||
const GCOps exaOps = {
|
||||
|
@ -1111,13 +1105,16 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
|||
PixmapPtr pPixmap;
|
||||
int xoff, yoff;
|
||||
ExaMigrationRec pixmaps[1];
|
||||
int nbox = REGION_NUM_RECTS (pRegion);
|
||||
BoxPtr pBox = REGION_RECTS (pRegion);
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||
|
||||
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid,
|
||||
alu) ? NULL : pRegion;
|
||||
|
||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
|
||||
|
||||
if (pPixmap->drawable.width > pExaScr->info->maxX ||
|
||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
||||
{
|
||||
|
@ -1129,29 +1126,56 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
|||
if ((pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) &&
|
||||
(*pExaScr->info->PrepareSolid) (pPixmap, alu, planemask, pixel))
|
||||
{
|
||||
int nbox;
|
||||
BoxPtr pBox;
|
||||
|
||||
nbox = REGION_NUM_RECTS (pRegion);
|
||||
pBox = REGION_RECTS (pRegion);
|
||||
|
||||
while (nbox--)
|
||||
{
|
||||
(*pExaScr->info->Solid) (pPixmap,
|
||||
pBox->x1 + xoff, pBox->y1 + yoff,
|
||||
pBox->x2 + xoff, pBox->y2 + yoff);
|
||||
(*pExaScr->info->Solid) (pPixmap, pBox->x1, pBox->y1, pBox->x2,
|
||||
pBox->y2);
|
||||
pBox++;
|
||||
}
|
||||
(*pExaScr->info->DoneSolid) (pPixmap);
|
||||
exaMarkSync(pDrawable->pScreen);
|
||||
|
||||
if (pDrawable->width == 1 && pDrawable->height == 1 &&
|
||||
pDrawable->bitsPerPixel != 24) {
|
||||
ExaPixmapPriv(pPixmap);
|
||||
|
||||
switch (pDrawable->bitsPerPixel) {
|
||||
case 32:
|
||||
*(CARD32*)pExaPixmap->sys_ptr = pixel;
|
||||
break;
|
||||
case 16:
|
||||
*(CARD16*)pExaPixmap->sys_ptr = pixel;
|
||||
break;
|
||||
case 8:
|
||||
*(CARD8*)pExaPixmap->sys_ptr = pixel;
|
||||
}
|
||||
|
||||
REGION_UNION(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
|
||||
pRegion);
|
||||
}
|
||||
|
||||
REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
fallback:
|
||||
if (alu != GXcopy || planemask != FB_ALLONES)
|
||||
return FALSE;
|
||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable,
|
||||
exaDrawableLocation(pDrawable)));
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
fbFillRegionSolid (pDrawable, pRegion, 0,
|
||||
fbReplicatePixel (pixel, pDrawable->bitsPerPixel));
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
if (alu != GXcopy || !EXA_PM_IS_SOLID(pDrawable, planemask)) {
|
||||
REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
|
||||
return FALSE;
|
||||
}
|
||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable,
|
||||
exaDrawableLocation(pDrawable)));
|
||||
exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pixmaps[0].pReg);
|
||||
REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
|
||||
fbFillRegionSolid (pDrawable, pRegion, 0,
|
||||
fbReplicatePixel (pixel, pDrawable->bitsPerPixel));
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1189,9 +1213,15 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled,
|
||||
alu) ? NULL : pRegion;
|
||||
pixmaps[1].as_dst = FALSE;
|
||||
pixmaps[1].as_src = TRUE;
|
||||
pixmaps[1].pPix = pTile;
|
||||
pixmaps[1].pReg = NULL;
|
||||
|
||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
|
||||
|
||||
if (pPixmap->drawable.width > pExaScr->info->maxX ||
|
||||
pPixmap->drawable.height > pExaScr->info->maxY ||
|
||||
|
@ -1221,7 +1251,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
int dstY = pBox->y1;
|
||||
int tileY;
|
||||
|
||||
tileY = (dstY - pDrawable->y - pPatOrg->y) % tileHeight;
|
||||
tileY = (dstY - yoff - pDrawable->y - pPatOrg->y) % tileHeight;
|
||||
while (height > 0) {
|
||||
int width = pBox->x2 - pBox->x1;
|
||||
int dstX = pBox->x1;
|
||||
|
@ -1232,7 +1262,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
h = height;
|
||||
height -= h;
|
||||
|
||||
tileX = (dstX - pDrawable->x - pPatOrg->x) % tileWidth;
|
||||
tileX = (dstX - xoff - pDrawable->x - pPatOrg->x) % tileWidth;
|
||||
while (width > 0) {
|
||||
int w = tileWidth - tileX;
|
||||
if (w > width)
|
||||
|
@ -1241,8 +1271,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
|
||||
(*pExaScr->info->Copy) (pPixmap,
|
||||
tileX + tileXoff, tileY + tileYoff,
|
||||
dstX + xoff, dstY + yoff,
|
||||
w, h);
|
||||
dstX, dstY, w, h);
|
||||
dstX += w;
|
||||
tileX = 0;
|
||||
}
|
||||
|
@ -1253,17 +1282,20 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
}
|
||||
(*pExaScr->info->DoneCopy) (pPixmap);
|
||||
exaMarkSync(pDrawable->pScreen);
|
||||
REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
fallback:
|
||||
if (alu != GXcopy || planemask != FB_ALLONES)
|
||||
if (alu != GXcopy || !EXA_PM_IS_SOLID(pDrawable, planemask)) {
|
||||
REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
|
||||
return FALSE;
|
||||
}
|
||||
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pTile, pDrawable,
|
||||
exaDrawableLocation(&pTile->drawable),
|
||||
exaDrawableLocation(pDrawable)));
|
||||
exaDoMigration (pixmaps, 2, FALSE);
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pixmaps[0].pReg);
|
||||
REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
|
||||
exaPrepareAccess ((DrawablePtr)pTile, EXA_PREPARE_SRC);
|
||||
fbFillRegionTiled (pDrawable, pRegion, pTile);
|
||||
exaFinishAccess ((DrawablePtr)pTile, EXA_PREPARE_SRC);
|
||||
|
@ -1272,77 +1304,13 @@ fallback:
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||
{
|
||||
ExaScreenPriv (pWin->drawable.pScreen);
|
||||
PixmapPtr pPixmap = exaGetDrawablePixmap((DrawablePtr)pWin);
|
||||
int xoff, yoff;
|
||||
BoxPtr pBox;
|
||||
int nbox = REGION_NUM_RECTS(pRegion);
|
||||
|
||||
if (!nbox)
|
||||
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);
|
||||
goto damage;
|
||||
case BackgroundPixmap:
|
||||
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap,
|
||||
&zeros, FB_ALLONES, GXcopy);
|
||||
goto damage;
|
||||
}
|
||||
break;
|
||||
case PW_BORDER:
|
||||
if (pWin->borderIsPixel) {
|
||||
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel,
|
||||
FB_ALLONES, GXcopy);
|
||||
goto damage;
|
||||
} else {
|
||||
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap,
|
||||
&zeros, FB_ALLONES, GXcopy);
|
||||
goto damage;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||
|
||||
damage:
|
||||
exaGetDrawableDeltas((DrawablePtr)pWin, pPixmap, &xoff, &yoff);
|
||||
|
||||
pBox = REGION_RECTS(pRegion);
|
||||
|
||||
while (nbox--)
|
||||
{
|
||||
exaPixmapDirty (pPixmap, pBox->x1 + xoff, pBox->y1 + yoff,
|
||||
pBox->x2 + xoff, pBox->y2 + yoff);
|
||||
pBox++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Accelerates GetImage for solid ZPixmap downloads from framebuffer memory.
|
||||
*
|
||||
* This is probably the only case we actually care about. The rest fall through
|
||||
* to migration and ExaCheckGetImage, which hopefully will result in migration
|
||||
* pushing the pixmap out of framebuffer.
|
||||
* to migration and fbGetImage, which hopefully will result in migration pushing
|
||||
* the pixmap out of framebuffer.
|
||||
*/
|
||||
void
|
||||
exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
|
||||
|
@ -1350,63 +1318,62 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
|
|||
{
|
||||
ExaScreenPriv (pDrawable->pScreen);
|
||||
ExaMigrationRec pixmaps[1];
|
||||
BoxRec Box;
|
||||
RegionRec Reg;
|
||||
PixmapPtr pPix;
|
||||
int xoff, yoff;
|
||||
Bool ok;
|
||||
|
||||
if (pExaScr->swappedOut || (w == 1 && h == 1))
|
||||
pixmaps[0].as_dst = FALSE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = pPix = exaGetDrawablePixmap (pDrawable);
|
||||
pixmaps[0].pReg = &Reg;
|
||||
|
||||
exaGetDrawableDeltas (pDrawable, pPix, &xoff, &yoff);
|
||||
|
||||
Box.x1 = pDrawable->y + x + xoff;
|
||||
Box.y1 = pDrawable->y + y + yoff;
|
||||
Box.x2 = Box.x1 + w;
|
||||
Box.y2 = Box.y1 + h;
|
||||
|
||||
REGION_INIT(pScreen, &Reg, &Box, 1);
|
||||
|
||||
if (pExaScr->swappedOut)
|
||||
goto fallback;
|
||||
|
||||
if (pExaScr->info->DownloadFromScreen == NULL)
|
||||
exaDoMigration(pixmaps, 1, FALSE);
|
||||
|
||||
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
||||
|
||||
if (pPix == NULL || pExaScr->info->DownloadFromScreen == NULL)
|
||||
goto fallback;
|
||||
|
||||
/* Only cover the ZPixmap, solid copy case. */
|
||||
if (format != ZPixmap || !EXA_PM_IS_SOLID(pDrawable, planeMask))
|
||||
goto migrate_and_fallback;
|
||||
goto fallback;
|
||||
|
||||
/* Only try to handle the 8bpp and up cases, since we don't want to think
|
||||
* about <8bpp.
|
||||
*/
|
||||
if (pDrawable->bitsPerPixel < 8)
|
||||
goto migrate_and_fallback;
|
||||
|
||||
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
||||
if (pPix == NULL)
|
||||
goto fallback;
|
||||
|
||||
xoff += pDrawable->x;
|
||||
yoff += pDrawable->y;
|
||||
|
||||
ok = pExaScr->info->DownloadFromScreen(pPix, x + xoff, y + yoff, w, h, d,
|
||||
ok = pExaScr->info->DownloadFromScreen(pPix, pDrawable->x + x + xoff,
|
||||
pDrawable->y + y + yoff, w, h, d,
|
||||
PixmapBytePad(w, pDrawable->depth));
|
||||
if (ok) {
|
||||
exaWaitSync(pDrawable->pScreen);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
migrate_and_fallback:
|
||||
pixmaps[0].as_dst = FALSE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
fallback:
|
||||
ExaCheckGetImage (pDrawable, x, y, w, h, format, planeMask, d);
|
||||
}
|
||||
|
||||
/**
|
||||
* GetSpans isn't accelerated yet, but performs migration so that we'll
|
||||
* hopefully avoid the read-from-framebuffer cost.
|
||||
*/
|
||||
void
|
||||
exaGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth,
|
||||
int nspans, char *pdstStart)
|
||||
{
|
||||
ExaMigrationRec pixmaps[1];
|
||||
|
||||
pixmaps[0].as_dst = FALSE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
|
||||
ExaCheckGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
|
||||
EXA_FALLBACK(("from %p (%c)\n", pDrawable,
|
||||
exaDrawableLocation(pDrawable)));
|
||||
|
||||
exaPrepareAccessReg (pDrawable, EXA_PREPARE_SRC, &Reg);
|
||||
fbGetImage (pDrawable, x, y, w, h, format, planeMask, d);
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_SRC);
|
||||
|
||||
out:
|
||||
REGION_UNINIT(pScreen, &Reg);
|
||||
}
|
||||
|
|
|
@ -90,7 +90,8 @@ exaPixmapIsDirty (PixmapPtr pPix)
|
|||
ExaPixmapPriv (pPix);
|
||||
|
||||
return pExaPixmap == NULL ||
|
||||
REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage));
|
||||
REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage)) ||
|
||||
!REGION_EQUAL(pScreen, &pExaPixmap->validSys, &pExaPixmap->validFB);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -113,24 +114,71 @@ exaPixmapShouldBeInFB (PixmapPtr pPix)
|
|||
|
||||
/**
|
||||
* If the pixmap is currently dirty, this copies at least the dirty area from
|
||||
* the framebuffer memory copy to the system memory copy. Both areas must be
|
||||
* allocated.
|
||||
* FB to system or vice versa. Both areas must be allocated.
|
||||
*/
|
||||
static void
|
||||
exaCopyDirtyToSys (PixmapPtr pPixmap)
|
||||
static _X_INLINE void
|
||||
exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
|
||||
Bool (*transfer) (PixmapPtr pPix, int x, int y, int w, int h,
|
||||
char *sys, int sys_pitch), CARD8 *fallback_src,
|
||||
CARD8 *fallback_dst, int fallback_srcpitch, int fallback_dstpitch,
|
||||
int fallback_index, void (*sync) (ScreenPtr pScreen))
|
||||
{
|
||||
ExaScreenPriv (pPixmap->drawable.pScreen);
|
||||
PixmapPtr pPixmap = migrate->pPix;
|
||||
ExaPixmapPriv (pPixmap);
|
||||
RegionPtr pRegion = DamageRegion (pExaPixmap->pDamage);
|
||||
CARD8 *save_ptr;
|
||||
RegionPtr damage = DamageRegion (pExaPixmap->pDamage);
|
||||
RegionRec CopyReg;
|
||||
Bool save_offscreen;
|
||||
int save_pitch;
|
||||
BoxPtr pBox = REGION_RECTS(pRegion);
|
||||
int nbox = REGION_NUM_RECTS(pRegion);
|
||||
Bool do_sync = FALSE;
|
||||
BoxPtr pBox;
|
||||
int nbox;
|
||||
Bool access_prepared = FALSE;
|
||||
|
||||
save_ptr = pPixmap->devPrivate.ptr;
|
||||
/* Damaged bits are valid in current copy but invalid in other one */
|
||||
if (exaPixmapIsOffscreen(pPixmap)) {
|
||||
REGION_UNION(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB,
|
||||
damage);
|
||||
REGION_SUBTRACT(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
|
||||
damage);
|
||||
} else {
|
||||
REGION_UNION(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
|
||||
damage);
|
||||
REGION_SUBTRACT(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB,
|
||||
damage);
|
||||
}
|
||||
|
||||
REGION_EMPTY(pScreen, damage);
|
||||
|
||||
/* Copy bits valid in source but not in destination */
|
||||
REGION_NULL(pScreen, &CopyReg);
|
||||
REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst);
|
||||
|
||||
if (migrate->as_dst) {
|
||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||
|
||||
if (REGION_NIL(pending_damage)) {
|
||||
static Bool firsttime = TRUE;
|
||||
|
||||
if (firsttime) {
|
||||
ErrorF("%s: Pending damage region empty!\n", __func__);
|
||||
firsttime = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage);
|
||||
|
||||
if (migrate->pReg)
|
||||
REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
||||
} else {
|
||||
if (migrate->pReg)
|
||||
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
||||
}
|
||||
|
||||
pBox = REGION_RECTS(&CopyReg);
|
||||
nbox = REGION_NUM_RECTS(&CopyReg);
|
||||
|
||||
save_offscreen = pExaPixmap->offscreen;
|
||||
save_pitch = pPixmap->devKind;
|
||||
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
|
||||
pExaPixmap->offscreen = TRUE;
|
||||
pPixmap->devKind = pExaPixmap->fb_pitch;
|
||||
|
||||
while (nbox--) {
|
||||
|
@ -142,41 +190,57 @@ exaCopyDirtyToSys (PixmapPtr pPixmap)
|
|||
if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2)
|
||||
continue;
|
||||
|
||||
if (pExaScr->info->DownloadFromScreen == NULL ||
|
||||
!pExaScr->info->DownloadFromScreen (pPixmap,
|
||||
pBox->x1, pBox->y1,
|
||||
pBox->x2 - pBox->x1,
|
||||
pBox->y2 - pBox->y1,
|
||||
pExaPixmap->sys_ptr
|
||||
+ pBox->y1 * pExaPixmap->sys_pitch
|
||||
+ pBox->x1 * pPixmap->drawable.bitsPerPixel / 8,
|
||||
pExaPixmap->sys_pitch))
|
||||
if (!transfer || !transfer (pPixmap,
|
||||
pBox->x1, pBox->y1,
|
||||
pBox->x2 - pBox->x1,
|
||||
pBox->y2 - pBox->y1,
|
||||
pExaPixmap->sys_ptr
|
||||
+ pBox->y1 * pExaPixmap->sys_pitch
|
||||
+ pBox->x1 * pPixmap->drawable.bitsPerPixel / 8,
|
||||
pExaPixmap->sys_pitch))
|
||||
{
|
||||
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
if (!access_prepared) {
|
||||
ExaDoPrepareAccess(&pPixmap->drawable, fallback_index);
|
||||
access_prepared = TRUE;
|
||||
}
|
||||
exaMemcpyBox (pPixmap, pBox,
|
||||
pExaPixmap->fb_ptr, pExaPixmap->fb_pitch,
|
||||
pExaPixmap->sys_ptr, pExaPixmap->sys_pitch);
|
||||
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
fallback_src, fallback_srcpitch,
|
||||
fallback_dst, fallback_dstpitch);
|
||||
}
|
||||
else
|
||||
do_sync = TRUE;
|
||||
|
||||
pBox++;
|
||||
}
|
||||
|
||||
/* Make sure the bits have actually landed, since we don't necessarily sync
|
||||
* when accessing pixmaps in system memory.
|
||||
*/
|
||||
if (do_sync)
|
||||
exaWaitSync (pPixmap->drawable.pScreen);
|
||||
if (access_prepared)
|
||||
exaFinishAccess(&pPixmap->drawable, fallback_index);
|
||||
else
|
||||
sync (pPixmap->drawable.pScreen);
|
||||
|
||||
pPixmap->devPrivate.ptr = save_ptr;
|
||||
pExaPixmap->offscreen = save_offscreen;
|
||||
pPixmap->devKind = save_pitch;
|
||||
|
||||
/* The previously damaged bits are now no longer damaged but valid */
|
||||
REGION_UNION(pPixmap->drawable.pScreen,
|
||||
&pExaPixmap->validReg, &pExaPixmap->validReg, pRegion);
|
||||
DamageEmpty (pExaPixmap->pDamage);
|
||||
/* The copied bits are now valid in destination */
|
||||
REGION_UNION(pScreen, pValidDst, pValidDst, &CopyReg);
|
||||
|
||||
REGION_UNINIT(pScreen, &CopyReg);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the pixmap is currently dirty, this copies at least the dirty area from
|
||||
* the framebuffer memory copy to the system memory copy. Both areas must be
|
||||
* allocated.
|
||||
*/
|
||||
static void
|
||||
exaCopyDirtyToSys (ExaMigrationPtr migrate)
|
||||
{
|
||||
PixmapPtr pPixmap = migrate->pPix;
|
||||
ExaScreenPriv (pPixmap->drawable.pScreen);
|
||||
ExaPixmapPriv (pPixmap);
|
||||
|
||||
exaCopyDirty(migrate, &pExaPixmap->validSys, &pExaPixmap->validFB,
|
||||
pExaScr->info->DownloadFromScreen, pExaPixmap->fb_ptr,
|
||||
pExaPixmap->sys_ptr, pExaPixmap->fb_pitch,
|
||||
pExaPixmap->sys_pitch, EXA_PREPARE_SRC, exaWaitSync);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -185,97 +249,16 @@ exaCopyDirtyToSys (PixmapPtr pPixmap)
|
|||
* allocated.
|
||||
*/
|
||||
static void
|
||||
exaCopyDirtyToFb (PixmapPtr pPixmap)
|
||||
exaCopyDirtyToFb (ExaMigrationPtr migrate)
|
||||
{
|
||||
PixmapPtr pPixmap = migrate->pPix;
|
||||
ExaScreenPriv (pPixmap->drawable.pScreen);
|
||||
ExaPixmapPriv (pPixmap);
|
||||
RegionPtr pRegion = DamageRegion (pExaPixmap->pDamage);
|
||||
CARD8 *save_ptr;
|
||||
int save_pitch;
|
||||
BoxPtr pBox = REGION_RECTS(pRegion);
|
||||
int nbox = REGION_NUM_RECTS(pRegion);
|
||||
Bool do_sync = FALSE;
|
||||
|
||||
save_ptr = pPixmap->devPrivate.ptr;
|
||||
save_pitch = pPixmap->devKind;
|
||||
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
|
||||
pPixmap->devKind = pExaPixmap->fb_pitch;
|
||||
|
||||
while (nbox--) {
|
||||
pBox->x1 = max(pBox->x1, 0);
|
||||
pBox->y1 = max(pBox->y1, 0);
|
||||
pBox->x2 = min(pBox->x2, pPixmap->drawable.width);
|
||||
pBox->y2 = min(pBox->y2, pPixmap->drawable.height);
|
||||
|
||||
if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2)
|
||||
continue;
|
||||
|
||||
if (pExaScr->info->UploadToScreen == NULL ||
|
||||
!pExaScr->info->UploadToScreen (pPixmap,
|
||||
pBox->x1, pBox->y1,
|
||||
pBox->x2 - pBox->x1,
|
||||
pBox->y2 - pBox->y1,
|
||||
pExaPixmap->sys_ptr
|
||||
+ pBox->y1 * pExaPixmap->sys_pitch
|
||||
+ pBox->x1 * pPixmap->drawable.bitsPerPixel / 8,
|
||||
pExaPixmap->sys_pitch))
|
||||
{
|
||||
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_DEST);
|
||||
exaMemcpyBox (pPixmap, pBox,
|
||||
pExaPixmap->sys_ptr, pExaPixmap->sys_pitch,
|
||||
pExaPixmap->fb_ptr, pExaPixmap->fb_pitch);
|
||||
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_DEST);
|
||||
}
|
||||
else
|
||||
do_sync = TRUE;
|
||||
|
||||
pBox++;
|
||||
}
|
||||
|
||||
if (do_sync)
|
||||
exaMarkSync (pPixmap->drawable.pScreen);
|
||||
|
||||
pPixmap->devPrivate.ptr = save_ptr;
|
||||
pPixmap->devKind = save_pitch;
|
||||
|
||||
/* The previously damaged bits are now no longer damaged but valid */
|
||||
REGION_UNION(pPixmap->drawable.pScreen,
|
||||
&pExaPixmap->validReg, &pExaPixmap->validReg, pRegion);
|
||||
DamageEmpty (pExaPixmap->pDamage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies out important pixmap data and removes references to framebuffer area.
|
||||
* Called when the memory manager decides it's time to kick the pixmap out of
|
||||
* framebuffer entirely.
|
||||
*/
|
||||
void
|
||||
exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
|
||||
{
|
||||
PixmapPtr pPixmap = area->privData;
|
||||
ExaPixmapPriv(pPixmap);
|
||||
RegionPtr pDamageReg = DamageRegion(pExaPixmap->pDamage);
|
||||
|
||||
DBG_MIGRATE (("Save %p (%p) (%dx%d) (%c)\n", pPixmap,
|
||||
(void*)(ExaGetPixmapPriv(pPixmap)->area ?
|
||||
ExaGetPixmapPriv(pPixmap)->area->offset : 0),
|
||||
pPixmap->drawable.width,
|
||||
pPixmap->drawable.height,
|
||||
exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
|
||||
|
||||
if (exaPixmapIsOffscreen(pPixmap)) {
|
||||
exaCopyDirtyToSys (pPixmap);
|
||||
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
||||
pPixmap->devKind = pExaPixmap->sys_pitch;
|
||||
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
}
|
||||
|
||||
pExaPixmap->fb_ptr = NULL;
|
||||
pExaPixmap->area = NULL;
|
||||
|
||||
/* Mark all valid bits as damaged, so they'll get copied to FB next time */
|
||||
REGION_UNION(pPixmap->drawable.pScreen, pDamageReg, pDamageReg,
|
||||
&pExaPixmap->validReg);
|
||||
exaCopyDirty(migrate, &pExaPixmap->validFB, &pExaPixmap->validSys,
|
||||
pExaScr->info->UploadToScreen, pExaPixmap->sys_ptr,
|
||||
pExaPixmap->fb_ptr, pExaPixmap->sys_pitch,
|
||||
pExaPixmap->fb_pitch, EXA_PREPARE_DEST, exaMarkSync);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -293,10 +276,11 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
|
|||
* we mark the pixmap dirty, so that the next exaMoveInPixmap will actually move
|
||||
* all the data, since it's almost surely all valid now.
|
||||
*/
|
||||
void
|
||||
exaMoveInPixmap (PixmapPtr pPixmap)
|
||||
static void
|
||||
exaDoMoveInPixmap (ExaMigrationPtr migrate)
|
||||
{
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
PixmapPtr pPixmap = migrate->pPix;
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
ExaScreenPriv (pScreen);
|
||||
ExaPixmapPriv (pPixmap);
|
||||
|
||||
|
@ -304,10 +288,6 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
if (pExaScr->swappedOut)
|
||||
return;
|
||||
|
||||
/* If we're already in FB, our work is done. */
|
||||
if (exaPixmapIsOffscreen(pPixmap))
|
||||
return;
|
||||
|
||||
/* If we're not allowed to move, then fail. */
|
||||
if (exaPixmapIsPinned(pPixmap))
|
||||
return;
|
||||
|
@ -331,6 +311,11 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
pExaPixmap->area->offset;
|
||||
}
|
||||
|
||||
exaCopyDirtyToFb (migrate);
|
||||
|
||||
if (exaPixmapIsOffscreen(pPixmap))
|
||||
return;
|
||||
|
||||
DBG_MIGRATE (("-> %p (0x%x) (%dx%d) (%c)\n", pPixmap,
|
||||
(ExaGetPixmapPriv(pPixmap)->area ?
|
||||
ExaGetPixmapPriv(pPixmap)->area->offset : 0),
|
||||
|
@ -338,28 +323,37 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
pPixmap->drawable.height,
|
||||
exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
|
||||
|
||||
exaCopyDirtyToFb (pPixmap);
|
||||
pExaPixmap->offscreen = TRUE;
|
||||
|
||||
if (pExaScr->hideOffscreenPixmapData)
|
||||
pPixmap->devPrivate.ptr = NULL;
|
||||
else
|
||||
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
|
||||
pPixmap->devKind = pExaPixmap->fb_pitch;
|
||||
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
}
|
||||
|
||||
void
|
||||
exaMoveInPixmap (PixmapPtr pPixmap)
|
||||
{
|
||||
static ExaMigrationRec migrate = { .as_dst = FALSE, .as_src = TRUE,
|
||||
.pReg = NULL };
|
||||
|
||||
migrate.pPix = pPixmap;
|
||||
exaDoMoveInPixmap (&migrate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Switches the current active location of the pixmap to system memory, copying
|
||||
* updated data out if necessary.
|
||||
*/
|
||||
void
|
||||
exaMoveOutPixmap (PixmapPtr pPixmap)
|
||||
static void
|
||||
exaDoMoveOutPixmap (ExaMigrationPtr migrate)
|
||||
{
|
||||
PixmapPtr pPixmap = migrate->pPix;
|
||||
ExaPixmapPriv (pPixmap);
|
||||
|
||||
if (exaPixmapIsPinned(pPixmap))
|
||||
if (!pExaPixmap->area || exaPixmapIsPinned(pPixmap))
|
||||
return;
|
||||
|
||||
exaCopyDirtyToSys (migrate);
|
||||
|
||||
if (exaPixmapIsOffscreen(pPixmap)) {
|
||||
|
||||
DBG_MIGRATE (("<- %p (%p) (%dx%d) (%c)\n", pPixmap,
|
||||
|
@ -369,21 +363,53 @@ exaMoveOutPixmap (PixmapPtr pPixmap)
|
|||
pPixmap->drawable.height,
|
||||
exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
|
||||
|
||||
exaCopyDirtyToSys (pPixmap);
|
||||
pExaPixmap->offscreen = FALSE;
|
||||
|
||||
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
||||
pPixmap->devKind = pExaPixmap->sys_pitch;
|
||||
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
exaMoveOutPixmap (PixmapPtr pPixmap)
|
||||
{
|
||||
static ExaMigrationRec migrate = { .as_dst = FALSE, .as_src = TRUE,
|
||||
.pReg = NULL };
|
||||
|
||||
migrate.pPix = pPixmap;
|
||||
exaDoMoveOutPixmap (&migrate);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Copies out important pixmap data and removes references to framebuffer area.
|
||||
* Called when the memory manager decides it's time to kick the pixmap out of
|
||||
* framebuffer entirely.
|
||||
*/
|
||||
void
|
||||
exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
|
||||
{
|
||||
PixmapPtr pPixmap = area->privData;
|
||||
ExaPixmapPriv(pPixmap);
|
||||
|
||||
exaMoveOutPixmap(pPixmap);
|
||||
|
||||
pExaPixmap->fb_ptr = NULL;
|
||||
pExaPixmap->area = NULL;
|
||||
|
||||
/* Mark all FB bits as invalid, so all valid system bits get copied to FB
|
||||
* next time */
|
||||
REGION_EMPTY(pPixmap->drawable.pScreen, &pExaPixmap->validFB);
|
||||
}
|
||||
|
||||
/**
|
||||
* For the "greedy" migration scheme, pushes the pixmap toward being located in
|
||||
* framebuffer memory.
|
||||
*/
|
||||
static void
|
||||
exaMigrateTowardFb (PixmapPtr pPixmap)
|
||||
exaMigrateTowardFb (ExaMigrationPtr migrate)
|
||||
{
|
||||
PixmapPtr pPixmap = migrate->pPix;
|
||||
ExaPixmapPriv (pPixmap);
|
||||
|
||||
if (pExaPixmap == NULL) {
|
||||
|
@ -403,7 +429,7 @@ exaMigrateTowardFb (PixmapPtr pPixmap)
|
|||
(pointer)pPixmap, pExaPixmap->score));
|
||||
|
||||
if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) {
|
||||
exaMoveInPixmap(pPixmap);
|
||||
exaDoMoveInPixmap(migrate);
|
||||
pExaPixmap->score = 0;
|
||||
}
|
||||
|
||||
|
@ -413,7 +439,7 @@ exaMigrateTowardFb (PixmapPtr pPixmap)
|
|||
if (pExaPixmap->score >= EXA_PIXMAP_SCORE_MOVE_IN &&
|
||||
!exaPixmapIsOffscreen(pPixmap))
|
||||
{
|
||||
exaMoveInPixmap (pPixmap);
|
||||
exaDoMoveInPixmap(migrate);
|
||||
}
|
||||
|
||||
ExaOffscreenMarkUsed (pPixmap);
|
||||
|
@ -424,8 +450,9 @@ exaMigrateTowardFb (PixmapPtr pPixmap)
|
|||
* system memory.
|
||||
*/
|
||||
static void
|
||||
exaMigrateTowardSys (PixmapPtr pPixmap)
|
||||
exaMigrateTowardSys (ExaMigrationPtr migrate)
|
||||
{
|
||||
PixmapPtr pPixmap = migrate->pPix;
|
||||
ExaPixmapPriv (pPixmap);
|
||||
|
||||
if (pExaPixmap == NULL) {
|
||||
|
@ -447,7 +474,7 @@ exaMigrateTowardSys (PixmapPtr pPixmap)
|
|||
pExaPixmap->score--;
|
||||
|
||||
if (pExaPixmap->score <= EXA_PIXMAP_SCORE_MOVE_OUT && pExaPixmap->area)
|
||||
exaMoveOutPixmap (pPixmap);
|
||||
exaDoMoveOutPixmap(migrate);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -459,19 +486,29 @@ exaAssertNotDirty (PixmapPtr pPixmap)
|
|||
{
|
||||
ExaPixmapPriv (pPixmap);
|
||||
CARD8 *dst, *src;
|
||||
RegionPtr pValidReg = &pExaPixmap->validReg;
|
||||
int dst_pitch, src_pitch, cpp, y, nbox = REGION_NUM_RECTS(pValidReg);
|
||||
BoxPtr pBox = REGION_RECTS(pValidReg);
|
||||
RegionRec ValidReg;
|
||||
int dst_pitch, src_pitch, cpp, y, nbox;
|
||||
BoxPtr pBox;
|
||||
Bool ret = TRUE;
|
||||
|
||||
if (!nbox || exaPixmapIsPinned(pPixmap) || pExaPixmap->fb_ptr == NULL)
|
||||
if (exaPixmapIsPinned(pPixmap) || pExaPixmap->area == NULL)
|
||||
return ret;
|
||||
|
||||
REGION_NULL(pScreen, &ValidReg);
|
||||
REGION_INTERSECT(pScreen, &ValidReg, &pExaPixmap->validFB,
|
||||
&pExaPixmap->validSys);
|
||||
nbox = REGION_NUM_RECTS(&ValidReg);
|
||||
|
||||
if (!nbox)
|
||||
goto out;
|
||||
|
||||
pBox = REGION_RECTS(&ValidReg);
|
||||
|
||||
dst_pitch = pExaPixmap->sys_pitch;
|
||||
src_pitch = pExaPixmap->fb_pitch;
|
||||
cpp = pPixmap->drawable.bitsPerPixel / 8;
|
||||
|
||||
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
ExaDoPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
while (nbox--) {
|
||||
int rowbytes;
|
||||
|
||||
|
@ -499,6 +536,8 @@ exaAssertNotDirty (PixmapPtr pPixmap)
|
|||
}
|
||||
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
|
||||
out:
|
||||
REGION_UNINIT(pScreen, &ValidReg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -553,7 +592,7 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
|||
{
|
||||
for (i = 0; i < npixmaps; i++) {
|
||||
if (!exaPixmapIsDirty (pixmaps[i].pPix))
|
||||
exaMoveOutPixmap (pixmaps[i].pPix);
|
||||
exaDoMoveOutPixmap (pixmaps + i);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -564,17 +603,17 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
|||
*/
|
||||
if (!can_accel) {
|
||||
for (i = 0; i < npixmaps; i++) {
|
||||
exaMigrateTowardSys (pixmaps[i].pPix);
|
||||
exaMigrateTowardSys (pixmaps + i);
|
||||
if (!exaPixmapIsDirty (pixmaps[i].pPix))
|
||||
exaMoveOutPixmap (pixmaps[i].pPix);
|
||||
exaDoMoveOutPixmap (pixmaps + i);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Finally, the acceleration path. Move them all in. */
|
||||
for (i = 0; i < npixmaps; i++) {
|
||||
exaMigrateTowardFb(pixmaps[i].pPix);
|
||||
exaMoveInPixmap(pixmaps[i].pPix);
|
||||
exaMigrateTowardFb(pixmaps + i);
|
||||
exaDoMoveInPixmap(pixmaps + i);
|
||||
}
|
||||
} else if (pExaScr->migration == ExaMigrationGreedy) {
|
||||
/* If we can't accelerate, either because the driver can't or because one of
|
||||
|
@ -590,7 +629,7 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
|||
*/
|
||||
if (!can_accel) {
|
||||
for (i = 0; i < npixmaps; i++)
|
||||
exaMigrateTowardSys (pixmaps[i].pPix);
|
||||
exaMigrateTowardSys (pixmaps + i);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -598,14 +637,14 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
|||
if (exaPixmapIsOffscreen(pixmaps[i].pPix)) {
|
||||
/* Found one in FB, so move all to FB. */
|
||||
for (j = 0; j < npixmaps; j++)
|
||||
exaMigrateTowardFb(pixmaps[j].pPix);
|
||||
exaMigrateTowardFb(pixmaps + i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Nobody's in FB, so move all away from FB. */
|
||||
for (i = 0; i < npixmaps; i++)
|
||||
exaMigrateTowardSys(pixmaps[i].pPix);
|
||||
exaMigrateTowardSys(pixmaps + i);
|
||||
} else if (pExaScr->migration == ExaMigrationAlways) {
|
||||
/* Always move the pixmaps out if we can't accelerate. If we can
|
||||
* accelerate, try to move them all in. If that fails, then move them
|
||||
|
@ -613,23 +652,18 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
|||
*/
|
||||
if (!can_accel) {
|
||||
for (i = 0; i < npixmaps; i++)
|
||||
exaMoveOutPixmap(pixmaps[i].pPix);
|
||||
exaDoMoveOutPixmap(pixmaps + i);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Now, try to move them all into FB */
|
||||
for (i = 0; i < npixmaps; i++) {
|
||||
exaMoveInPixmap(pixmaps[i].pPix);
|
||||
exaDoMoveInPixmap(pixmaps + i);
|
||||
}
|
||||
|
||||
/* If we couldn't fit everything in, then kick back out */
|
||||
/* If we couldn't fit everything in, abort */
|
||||
for (i = 0; i < npixmaps; i++) {
|
||||
if (!exaPixmapIsOffscreen(pixmaps[i].pPix)) {
|
||||
EXA_FALLBACK(("Pixmap %p (%dx%d) not in fb\n", pixmaps[i].pPix,
|
||||
pixmaps[i].pPix->drawable.width,
|
||||
pixmaps[i].pPix->drawable.height));
|
||||
for (j = 0; j < npixmaps; j++)
|
||||
exaMoveOutPixmap(pixmaps[j].pPix);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,21 +101,21 @@ typedef struct {
|
|||
CloseScreenProcPtr SavedCloseScreen;
|
||||
GetImageProcPtr SavedGetImage;
|
||||
GetSpansProcPtr SavedGetSpans;
|
||||
PaintWindowBackgroundProcPtr SavedPaintWindowBackground;
|
||||
CreatePixmapProcPtr SavedCreatePixmap;
|
||||
DestroyPixmapProcPtr SavedDestroyPixmap;
|
||||
PaintWindowBorderProcPtr SavedPaintWindowBorder;
|
||||
CopyWindowProcPtr SavedCopyWindow;
|
||||
ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
|
||||
BitmapToRegionProcPtr SavedBitmapToRegion;
|
||||
ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader;
|
||||
#ifdef RENDER
|
||||
CompositeProcPtr SavedComposite;
|
||||
RasterizeTrapezoidProcPtr SavedRasterizeTrapezoid;
|
||||
AddTrianglesProcPtr SavedAddTriangles;
|
||||
TrianglesProcPtr SavedTriangles;
|
||||
GlyphsProcPtr SavedGlyphs;
|
||||
TrapezoidsProcPtr SavedTrapezoids;
|
||||
#endif
|
||||
|
||||
Bool swappedOut;
|
||||
enum ExaMigrationHeuristic migration;
|
||||
Bool hideOffscreenPixmapData;
|
||||
Bool checkDirtyCorrectness;
|
||||
unsigned disableFbCount;
|
||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||
|
@ -157,6 +157,7 @@ extern DevPrivateKey exaPixmapPrivateKey;
|
|||
typedef struct {
|
||||
ExaOffscreenArea *area;
|
||||
int score; /**< score for the move-in vs move-out heuristic */
|
||||
Bool offscreen;
|
||||
|
||||
CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */
|
||||
int sys_pitch; /**< pitch of pixmap in system memory */
|
||||
|
@ -172,16 +173,17 @@ typedef struct {
|
|||
*/
|
||||
DamagePtr pDamage;
|
||||
/**
|
||||
* The valid region marks the valid bits of a drawable (at least, as it's
|
||||
* derived from damage, which may be overreported).
|
||||
* The valid regions mark the valid bits (at least, as they're derived from
|
||||
* damage, which may be overreported) of a pixmap's system and FB copies.
|
||||
*/
|
||||
RegionRec validReg;
|
||||
RegionRec validSys, validFB;
|
||||
} ExaPixmapPrivRec, *ExaPixmapPrivPtr;
|
||||
|
||||
typedef struct _ExaMigrationRec {
|
||||
Bool as_dst;
|
||||
Bool as_src;
|
||||
PixmapPtr pPix;
|
||||
RegionPtr pReg;
|
||||
} ExaMigrationRec, *ExaMigrationPtr;
|
||||
|
||||
/**
|
||||
|
@ -190,6 +192,12 @@ typedef struct _ExaMigrationRec {
|
|||
*/
|
||||
void exaDDXDriverInit (ScreenPtr pScreen);
|
||||
|
||||
void
|
||||
exaPrepareAccessWindow(WindowPtr pWin);
|
||||
|
||||
void
|
||||
exaFinishAccessWindow(WindowPtr pWin);
|
||||
|
||||
/* exa_unaccel.c */
|
||||
void
|
||||
exaPrepareAccessGC(GCPtr pGC);
|
||||
|
@ -254,12 +262,6 @@ ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap,
|
|||
DrawablePtr pDrawable,
|
||||
int w, int h, int x, int y);
|
||||
|
||||
void
|
||||
ExaCheckGetImage (DrawablePtr pDrawable,
|
||||
int x, int y, int w, int h,
|
||||
unsigned int format, unsigned long planeMask,
|
||||
char *d);
|
||||
|
||||
void
|
||||
ExaCheckGetSpans (DrawablePtr pDrawable,
|
||||
int wMax,
|
||||
|
@ -268,13 +270,20 @@ ExaCheckGetSpans (DrawablePtr pDrawable,
|
|||
int nspans,
|
||||
char *pdstStart);
|
||||
|
||||
void
|
||||
ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
CARD32
|
||||
exaGetPixmapFirstPixel (PixmapPtr pPixmap);
|
||||
|
||||
/* exa_accel.c */
|
||||
|
||||
static _X_INLINE Bool
|
||||
exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask,
|
||||
unsigned int fillStyle, unsigned char alu)
|
||||
{
|
||||
return ((alu != GXcopy && alu != GXclear &&alu != GXset &&
|
||||
alu != GXcopyInverted) || fillStyle == FillStippled ||
|
||||
!EXA_PM_IS_SOLID(pDrawable, planemask));
|
||||
}
|
||||
|
||||
void
|
||||
exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
|
@ -283,16 +292,14 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
|
|||
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu);
|
||||
|
||||
void
|
||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
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,
|
||||
char *data);
|
||||
|
||||
void
|
||||
exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
|
||||
unsigned int format, unsigned long planeMask, char *d);
|
||||
|
||||
void
|
||||
exaGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth,
|
||||
int nspans, char *pdstStart);
|
||||
|
||||
extern const GCOps exaOps;
|
||||
|
||||
#ifdef MITSHM
|
||||
|
@ -329,6 +336,12 @@ void
|
|||
ExaOffscreenFini (ScreenPtr pScreen);
|
||||
|
||||
/* exa.c */
|
||||
void
|
||||
ExaDoPrepareAccess(DrawablePtr pDrawable, int index);
|
||||
|
||||
void
|
||||
exaPrepareAccessReg(DrawablePtr pDrawable, int index, RegionPtr pReg);
|
||||
|
||||
void
|
||||
exaPrepareAccess(DrawablePtr pDrawable, int index);
|
||||
|
||||
|
@ -372,6 +385,9 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
|||
void *closure);
|
||||
|
||||
/* exa_render.c */
|
||||
Bool
|
||||
exaOpReadsDestination (CARD8 op);
|
||||
|
||||
void
|
||||
exaComposite(CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
|
@ -392,12 +408,9 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|||
int ntrap, xTrapezoid *traps);
|
||||
|
||||
void
|
||||
exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap,
|
||||
int x_off, int y_off);
|
||||
|
||||
void
|
||||
exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri,
|
||||
xTriangle *tris);
|
||||
exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
|
||||
int ntri, xTriangle *tris);
|
||||
|
||||
void
|
||||
exaGlyphs (CARD8 op,
|
||||
|
|
316
exa/exa_render.c
316
exa/exa_render.c
|
@ -111,7 +111,7 @@ exaPrintCompositeFallback(CARD8 op,
|
|||
}
|
||||
#endif /* DEBUG_TRACE_FALL */
|
||||
|
||||
static Bool
|
||||
Bool
|
||||
exaOpReadsDestination (CARD8 op)
|
||||
{
|
||||
/* FALSE (does not read destination) is the list of ops in the protocol
|
||||
|
@ -261,16 +261,21 @@ exaTryDriverSolidFill(PicturePtr pSrc,
|
|||
width, height))
|
||||
return 1;
|
||||
|
||||
pDstPix = exaGetDrawablePixmap (pDst->pDrawable);
|
||||
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
|
||||
|
||||
REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y);
|
||||
|
||||
pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
|
||||
pixel = exaGetPixmapFirstPixel (pSrcPix);
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDst->pDrawable);
|
||||
pixmaps[0].pPix = pDstPix;
|
||||
pixmaps[0].pReg = ®ion;
|
||||
exaDoMigration(pixmaps, 1, TRUE);
|
||||
|
||||
pDstPix = exaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
|
||||
if (!pDstPix) {
|
||||
if (!exaPixmapIsOffscreen(pDstPix)) {
|
||||
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||
return 0;
|
||||
}
|
||||
|
@ -300,9 +305,7 @@ exaTryDriverSolidFill(PicturePtr pSrc,
|
|||
|
||||
while (nbox--)
|
||||
{
|
||||
(*pExaScr->info->Solid) (pDstPix,
|
||||
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
||||
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
||||
(*pExaScr->info->Solid) (pDstPix, pbox->x1, pbox->y1, pbox->x2, pbox->y2);
|
||||
pbox++;
|
||||
}
|
||||
|
||||
|
@ -366,28 +369,35 @@ exaTryDriverComposite(CARD8 op,
|
|||
xSrc += pSrc->pDrawable->x;
|
||||
ySrc += pSrc->pDrawable->y;
|
||||
|
||||
if (pExaScr->info->CheckComposite &&
|
||||
!(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst,
|
||||
xSrc, ySrc, xMask, yMask, xDst, yDst,
|
||||
width, height))
|
||||
return 1;
|
||||
|
||||
if (pExaScr->info->CheckComposite &&
|
||||
!(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst))
|
||||
{
|
||||
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||
return -1;
|
||||
}
|
||||
pDstPix = exaGetDrawablePixmap (pDst->pDrawable);
|
||||
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
|
||||
|
||||
REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y);
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = exaOpReadsDestination(op);
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDst->pDrawable);
|
||||
pixmaps[0].pPix = pDstPix;
|
||||
pixmaps[0].pReg = pixmaps[0].as_src ? NULL : ®ion;
|
||||
pixmaps[1].as_dst = FALSE;
|
||||
pixmaps[1].as_src = TRUE;
|
||||
pixmaps[1].pPix = exaGetDrawablePixmap (pSrc->pDrawable);
|
||||
pixmaps[1].pReg = NULL;
|
||||
if (pMask) {
|
||||
pixmaps[2].as_dst = FALSE;
|
||||
pixmaps[2].as_src = TRUE;
|
||||
pixmaps[2].pPix = exaGetDrawablePixmap (pMask->pDrawable);
|
||||
pixmaps[2].pReg = NULL;
|
||||
exaDoMigration(pixmaps, 3, TRUE);
|
||||
} else {
|
||||
exaDoMigration(pixmaps, 2, TRUE);
|
||||
|
@ -397,9 +407,8 @@ exaTryDriverComposite(CARD8 op,
|
|||
if (pMask)
|
||||
pMaskPix = exaGetOffscreenPixmap (pMask->pDrawable, &mask_off_x,
|
||||
&mask_off_y);
|
||||
pDstPix = exaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
|
||||
|
||||
if (!pDstPix) {
|
||||
if (!exaPixmapIsOffscreen(pDstPix)) {
|
||||
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||
return 0;
|
||||
}
|
||||
|
@ -429,21 +438,21 @@ exaTryDriverComposite(CARD8 op,
|
|||
nbox = REGION_NUM_RECTS(®ion);
|
||||
pbox = REGION_RECTS(®ion);
|
||||
|
||||
xMask -= xDst;
|
||||
yMask -= yDst;
|
||||
xMask = xMask + mask_off_x - xDst - dst_off_x;
|
||||
yMask = yMask + mask_off_y - yDst - dst_off_y;
|
||||
|
||||
xSrc -= xDst;
|
||||
ySrc -= yDst;
|
||||
xSrc = xSrc + src_off_x - xDst - dst_off_x;
|
||||
ySrc = ySrc + src_off_y - yDst - dst_off_y;
|
||||
|
||||
while (nbox--)
|
||||
{
|
||||
(*pExaScr->info->Composite) (pDstPix,
|
||||
pbox->x1 + xSrc + src_off_x,
|
||||
pbox->y1 + ySrc + src_off_y,
|
||||
pbox->x1 + xMask + mask_off_x,
|
||||
pbox->y1 + yMask + mask_off_y,
|
||||
pbox->x1 + dst_off_x,
|
||||
pbox->y1 + dst_off_y,
|
||||
pbox->x1 + xSrc,
|
||||
pbox->y1 + ySrc,
|
||||
pbox->x1 + xMask,
|
||||
pbox->y1 + yMask,
|
||||
pbox->x1,
|
||||
pbox->y1,
|
||||
pbox->x2 - pbox->x1,
|
||||
pbox->y2 - pbox->y1);
|
||||
pbox++;
|
||||
|
@ -519,9 +528,6 @@ exaTryMagicTwoPassCompositeHelper(CARD8 op,
|
|||
CARD16 height)
|
||||
{
|
||||
ExaScreenPriv (pDst->pDrawable->pScreen);
|
||||
DrawablePtr pDstDraw = pDst->pDrawable;
|
||||
PixmapPtr pDstPixmap = exaGetDrawablePixmap(pDstDraw);
|
||||
int xoff, yoff;
|
||||
|
||||
assert(op == PictOpOver);
|
||||
|
||||
|
@ -540,12 +546,6 @@ exaTryMagicTwoPassCompositeHelper(CARD8 op,
|
|||
exaComposite(PictOpOutReverse, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
|
||||
xDst, yDst, width, height);
|
||||
|
||||
exaGetDrawableDeltas(pDstDraw, pDstPixmap, &xoff, &yoff);
|
||||
xoff += pDstDraw->x;
|
||||
yoff += pDstDraw->y;
|
||||
exaPixmapDirty(pDstPixmap, xDst + xoff, yDst + yoff, xDst + xoff + width,
|
||||
yDst + yoff + height);
|
||||
|
||||
/* Then, add in the source value times the destination alpha factors (1.0).
|
||||
*/
|
||||
exaComposite(PictOpAdd, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
|
||||
|
@ -572,28 +572,8 @@ exaComposite(CARD8 op,
|
|||
int ret = -1;
|
||||
Bool saveSrcRepeat = pSrc->repeat;
|
||||
Bool saveMaskRepeat = pMask ? pMask->repeat : 0;
|
||||
ExaMigrationRec pixmaps[3];
|
||||
int npixmaps = 1;
|
||||
PixmapPtr pSrcPixmap = NULL;
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = exaOpReadsDestination(op);
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDst->pDrawable);
|
||||
|
||||
if (pSrc->pDrawable) {
|
||||
pSrcPixmap = exaGetDrawablePixmap (pSrc->pDrawable);
|
||||
pixmaps[npixmaps].as_dst = FALSE;
|
||||
pixmaps[npixmaps].as_src = TRUE;
|
||||
pixmaps[npixmaps].pPix = pSrcPixmap;
|
||||
npixmaps++;
|
||||
}
|
||||
|
||||
if (pMask && pMask->pDrawable) {
|
||||
pixmaps[npixmaps].as_dst = FALSE;
|
||||
pixmaps[npixmaps].as_src = TRUE;
|
||||
pixmaps[npixmaps].pPix = exaGetDrawablePixmap (pMask->pDrawable);
|
||||
npixmaps++;
|
||||
}
|
||||
RegionRec region;
|
||||
|
||||
/* We currently don't support acceleration of gradients, or other pictures
|
||||
* with a NULL pDrawable.
|
||||
|
@ -631,8 +611,6 @@ exaComposite(CARD8 op,
|
|||
}
|
||||
else if (pSrcPixmap && !pSrc->repeat && !pSrc->transform)
|
||||
{
|
||||
RegionRec region;
|
||||
|
||||
xDst += pDst->pDrawable->x;
|
||||
yDst += pDst->pDrawable->y;
|
||||
xSrc += pSrc->pDrawable->x;
|
||||
|
@ -654,7 +632,6 @@ exaComposite(CARD8 op,
|
|||
else if (pSrcPixmap && !pSrc->transform &&
|
||||
pSrc->repeatType == RepeatNormal)
|
||||
{
|
||||
RegionRec region;
|
||||
DDXPointRec srcOrg;
|
||||
|
||||
/* Let's see if the driver can do the repeat in one go */
|
||||
|
@ -738,7 +715,6 @@ fallback:
|
|||
exaPrintCompositeFallback (op, pSrc, pMask, pDst);
|
||||
#endif
|
||||
|
||||
exaDoMigration(pixmaps, npixmaps, FALSE);
|
||||
ExaCheckComposite (op, pSrc, pMask, pDst, xSrc, ySrc,
|
||||
xMask, yMask, xDst, yDst, width, height);
|
||||
|
||||
|
@ -754,7 +730,7 @@ done:
|
|||
* of PolyFillRect to initialize the pixmap after creating it, to prevent
|
||||
* the pixmap from being migrated.
|
||||
*
|
||||
* See the comments about exaTrapezoids.
|
||||
* See the comments about exaTrapezoids and exaTriangles.
|
||||
*/
|
||||
static PicturePtr
|
||||
exaCreateAlphaPicture (ScreenPtr pScreen,
|
||||
|
@ -826,36 +802,70 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|||
{
|
||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
||||
BoxRec bounds;
|
||||
Bool direct = op == PictOpAdd && miIsSolidAlpha (pSrc);
|
||||
|
||||
if (maskFormat || direct) {
|
||||
miTrapezoidBounds (ntrap, traps, &bounds);
|
||||
|
||||
if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for solid alpha add
|
||||
*/
|
||||
if (op == PictOpAdd && miIsSolidAlpha (pSrc))
|
||||
if (direct)
|
||||
{
|
||||
DrawablePtr pDraw = pDst->pDrawable;
|
||||
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
||||
ExaPixmapPriv (pixmap);
|
||||
RegionRec migration;
|
||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||
int xoff, yoff;
|
||||
|
||||
exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
|
||||
|
||||
xoff += pDraw->x;
|
||||
yoff += pDraw->y;
|
||||
|
||||
bounds.x1 += xoff;
|
||||
bounds.y1 += yoff;
|
||||
bounds.x2 += xoff;
|
||||
bounds.y2 += yoff;
|
||||
|
||||
REGION_INIT(pScreen, &migration, &bounds, 1);
|
||||
REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
|
||||
REGION_UNINIT(pScreen, &migration);
|
||||
|
||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||
|
||||
for (; ntrap; ntrap--, traps++)
|
||||
(*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
|
||||
|
||||
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||
}
|
||||
else if (maskFormat)
|
||||
{
|
||||
PicturePtr pPicture;
|
||||
BoxRec bounds;
|
||||
INT16 xDst, yDst;
|
||||
INT16 xRel, yRel;
|
||||
|
||||
xDst = traps[0].left.p1.x >> 16;
|
||||
yDst = traps[0].left.p1.y >> 16;
|
||||
|
||||
miTrapezoidBounds (ntrap, traps, &bounds);
|
||||
if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
|
||||
return;
|
||||
pPicture = exaCreateAlphaPicture (pScreen, pDst, maskFormat,
|
||||
bounds.x2 - bounds.x1,
|
||||
bounds.y2 - bounds.y1);
|
||||
if (!pPicture)
|
||||
return;
|
||||
|
||||
exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
|
||||
for (; ntrap; ntrap--, traps++)
|
||||
(*ps->RasterizeTrapezoid) (pPicture, traps,
|
||||
-bounds.x1, -bounds.y1);
|
||||
exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
CompositePicture (op, pSrc, pPicture, pDst,
|
||||
|
@ -875,61 +885,102 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|||
}
|
||||
}
|
||||
|
||||
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
|
||||
|
||||
/**
|
||||
* exaRasterizeTrapezoid is just a wrapper around the software implementation.
|
||||
* exaTriangles is essentially a copy of miTriangles that uses
|
||||
* exaCreateAlphaPicture instead of miCreateAlphaPicture.
|
||||
*
|
||||
* The trapezoid specification is basically too hard to be done in hardware (at
|
||||
* the very least, without programmability), so we just do the appropriate
|
||||
* Prepare/FinishAccess for it before using fbtrap.c.
|
||||
* The problem with miCreateAlphaPicture is that it calls PolyFillRect
|
||||
* to initialize the contents after creating the pixmap, which
|
||||
* causes the pixmap to be moved in for acceleration. The subsequent
|
||||
* call to AddTriangles won't be accelerated however, which forces the pixmap
|
||||
* to be moved out again.
|
||||
*
|
||||
* exaCreateAlphaPicture avoids this roundtrip by using ExaCheckPolyFillRect
|
||||
* to initialize the contents.
|
||||
*/
|
||||
void
|
||||
exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap,
|
||||
int x_off, int y_off)
|
||||
exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
|
||||
int ntri, xTriangle *tris)
|
||||
{
|
||||
DrawablePtr pDraw = pPicture->pDrawable;
|
||||
ExaMigrationRec pixmaps[1];
|
||||
int xoff, yoff;
|
||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
||||
BoxRec bounds;
|
||||
Bool direct = op == PictOpAdd && miIsSolidAlpha (pSrc);
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDraw);
|
||||
exaDoMigration(pixmaps, 1, FALSE);
|
||||
if (maskFormat || direct) {
|
||||
miTriangleBounds (ntri, tris, &bounds);
|
||||
|
||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||
fbRasterizeTrapezoid(pPicture, trap, x_off, y_off);
|
||||
exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff);
|
||||
exaPixmapDirty(pixmaps[0].pPix, pDraw->x + xoff, pDraw->y + yoff,
|
||||
pDraw->x + xoff + pDraw->width,
|
||||
pDraw->y + yoff + pDraw->height);
|
||||
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||
}
|
||||
if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* exaAddTriangles does migration and syncing before dumping down to the
|
||||
* software implementation.
|
||||
*/
|
||||
void
|
||||
exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri,
|
||||
xTriangle *tris)
|
||||
{
|
||||
DrawablePtr pDraw = pPicture->pDrawable;
|
||||
ExaMigrationRec pixmaps[1];
|
||||
int xoff, yoff;
|
||||
/*
|
||||
* Check for solid alpha add
|
||||
*/
|
||||
if (direct)
|
||||
{
|
||||
DrawablePtr pDraw = pDst->pDrawable;
|
||||
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
||||
ExaPixmapPriv (pixmap);
|
||||
RegionRec migration;
|
||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||
int xoff, yoff;
|
||||
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDraw);
|
||||
exaDoMigration(pixmaps, 1, FALSE);
|
||||
exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
|
||||
|
||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||
fbAddTriangles(pPicture, x_off, y_off, ntri, tris);
|
||||
exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff);
|
||||
exaPixmapDirty(pixmaps[0].pPix, pDraw->x + xoff, pDraw->y + yoff,
|
||||
pDraw->x + xoff + pDraw->width,
|
||||
pDraw->y + yoff + pDraw->height);
|
||||
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||
xoff += pDraw->x;
|
||||
yoff += pDraw->y;
|
||||
|
||||
bounds.x1 += xoff;
|
||||
bounds.y1 += yoff;
|
||||
bounds.x2 += xoff;
|
||||
bounds.y2 += yoff;
|
||||
|
||||
REGION_INIT(pScreen, &migration, &bounds, 1);
|
||||
REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
|
||||
REGION_UNINIT(pScreen, &migration);
|
||||
|
||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||
(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
|
||||
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||
}
|
||||
else if (maskFormat)
|
||||
{
|
||||
PicturePtr pPicture;
|
||||
INT16 xDst, yDst;
|
||||
INT16 xRel, yRel;
|
||||
|
||||
xDst = tris[0].p1.x >> 16;
|
||||
yDst = tris[0].p1.y >> 16;
|
||||
|
||||
pPicture = exaCreateAlphaPicture (pScreen, pDst, maskFormat,
|
||||
bounds.x2 - bounds.x1,
|
||||
bounds.y2 - bounds.y1);
|
||||
if (!pPicture)
|
||||
return;
|
||||
|
||||
exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
|
||||
(*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris);
|
||||
exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
CompositePicture (op, pSrc, pPicture, pDst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
|
||||
FreePicture (pPicture, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pDst->polyEdge == PolyEdgeSharp)
|
||||
maskFormat = PictureMatchFormat (pScreen, 1, PICT_a1);
|
||||
else
|
||||
maskFormat = PictureMatchFormat (pScreen, 8, PICT_a8);
|
||||
|
||||
for (; ntri; ntri--, tris++)
|
||||
exaTriangles (op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, tris);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1005,10 +1056,15 @@ exaGlyphsIntersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
|
||||
|
||||
/* exaGlyphs is a slight variation on miGlyphs, to support acceleration. The
|
||||
* issue is that miGlyphs' use of ModifyPixmapHeader makes it impossible to
|
||||
* migrate these pixmaps. So, instead we create a pixmap at the beginning of
|
||||
* the loop and upload each glyph into the pixmap before compositing.
|
||||
*
|
||||
* This is now used even when Composite can't be accelerated for better
|
||||
* migration control.
|
||||
*/
|
||||
void
|
||||
exaGlyphs (CARD8 op,
|
||||
|
@ -1025,11 +1081,10 @@ exaGlyphs (CARD8 op,
|
|||
PixmapPtr pPixmap = NULL;
|
||||
PicturePtr pPicture;
|
||||
PixmapPtr pMaskPixmap = NULL;
|
||||
PixmapPtr pDstPixmap = exaGetDrawablePixmap(pDst->pDrawable);
|
||||
PicturePtr pMask;
|
||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
||||
int width = 0, height = 0;
|
||||
int x, y, x1, y1, xoff, yoff;
|
||||
int x, y, x1, y1;
|
||||
int xDst = list->xOff, yDst = list->yOff;
|
||||
int n;
|
||||
int error;
|
||||
|
@ -1057,16 +1112,6 @@ exaGlyphs (CARD8 op,
|
|||
}
|
||||
}
|
||||
|
||||
/* If the driver doesn't support accelerated composite, there's no point in
|
||||
* going to this extra work. Assume that any driver that supports Composite
|
||||
* will be able to support component alpha using the two-pass helper.
|
||||
*/
|
||||
if (!pExaScr->info->PrepareComposite)
|
||||
{
|
||||
miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
|
||||
return;
|
||||
}
|
||||
|
||||
if (maskFormat)
|
||||
{
|
||||
GCPtr pGC;
|
||||
|
@ -1103,8 +1148,11 @@ exaGlyphs (CARD8 op,
|
|||
rect.y = 0;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
(*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect);
|
||||
exaPixmapDirty(pMaskPixmap, 0, 0, width, height);
|
||||
ExaCheckPolyFillRect (&pMaskPixmap->drawable, pGC, 1, &rect);
|
||||
if (pExaScr->info->PrepareComposite)
|
||||
(*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect);
|
||||
else
|
||||
exaPixmapDirty(pMaskPixmap, 0, 0, width, height);
|
||||
FreeScratchGC (pGC);
|
||||
x = -extents.x1;
|
||||
y = -extents.y1;
|
||||
|
@ -1116,8 +1164,6 @@ exaGlyphs (CARD8 op,
|
|||
y = 0;
|
||||
}
|
||||
|
||||
exaGetDrawableDeltas(pDst->pDrawable, pDstPixmap, &xoff, &yoff);
|
||||
|
||||
while (nlist--)
|
||||
{
|
||||
GCPtr pGC = NULL;
|
||||
|
@ -1170,8 +1216,9 @@ exaGlyphs (CARD8 op,
|
|||
* it'll stick there.
|
||||
*/
|
||||
pixmaps[0].as_dst = TRUE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].as_src = FALSE;
|
||||
pixmaps[0].pPix = pPixmap;
|
||||
pixmaps[0].pReg = NULL;
|
||||
exaDoMigration (pixmaps, 1, pExaScr->info->PrepareComposite != NULL);
|
||||
|
||||
while (n--)
|
||||
|
@ -1235,6 +1282,15 @@ exaGlyphs (CARD8 op,
|
|||
pScratchPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
}
|
||||
|
||||
#ifdef MITSHM
|
||||
if (pExaScr->info->PrepareComposite)
|
||||
exaShmPutImage(&pPixmap->drawable, pGC,
|
||||
pPixmap->drawable.depth, ZPixmap,
|
||||
glyph->info.width, glyph->info.height, 0, 0,
|
||||
glyph->info.width, glyph->info.height, 0, 0,
|
||||
glyphdata);
|
||||
else
|
||||
#endif
|
||||
exaCopyArea (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);
|
||||
}
|
||||
|
@ -1255,10 +1311,6 @@ exaGlyphs (CARD8 op,
|
|||
xSrc + x1 - xDst, ySrc + y1 - yDst,
|
||||
0, 0, x1, y1, glyph->info.width,
|
||||
glyph->info.height);
|
||||
x1 += pDst->pDrawable->x + xoff;
|
||||
y1 += pDst->pDrawable->y + yoff;
|
||||
exaPixmapDirty(pDstPixmap, x1, y1, x1 + glyph->info.width,
|
||||
y1 + glyph->info.height);
|
||||
}
|
||||
nextglyph:
|
||||
x += glyph->info.xOff;
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
|
||||
#include "exa_priv.h"
|
||||
|
||||
#ifdef RENDER
|
||||
#include "mipict.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* These functions wrap the low-level fb rendering functions and
|
||||
* synchronize framebuffer/accelerated drawing by stalling until
|
||||
|
@ -35,10 +39,13 @@
|
|||
*
|
||||
* Solid doesn't use an extra pixmap source, and Stippled/OpaqueStippled are
|
||||
* 1bpp and never in fb, so we don't worry about them.
|
||||
* We should worry about them for completeness sake and going forward.
|
||||
*/
|
||||
void
|
||||
exaPrepareAccessGC(GCPtr pGC)
|
||||
{
|
||||
if (pGC->stipple)
|
||||
exaPrepareAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK);
|
||||
if (pGC->fillStyle == FillTiled)
|
||||
exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
|
@ -50,7 +57,9 @@ void
|
|||
exaFinishAccessGC(GCPtr pGC)
|
||||
{
|
||||
if (pGC->fillStyle == FillTiled)
|
||||
exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_MASK);
|
||||
if (pGC->stipple)
|
||||
exaFinishAccess(&pGC->stipple->drawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
|
||||
#if DEBUG_TRACE_FALL
|
||||
|
@ -88,15 +97,14 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
|
|||
int x, int y, int w, int h, int leftPad, int format,
|
||||
char *bits)
|
||||
{
|
||||
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
||||
int xoff, yoff;
|
||||
|
||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
|
||||
pGC->alu))
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
else
|
||||
ExaDoPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||
exaPixmapDirty(pPixmap, x + xoff, y + yoff, x + xoff + w, y + yoff + h);
|
||||
}
|
||||
|
||||
RegionPtr
|
||||
|
@ -188,6 +196,12 @@ ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC,
|
|||
int narcs, xArc *pArcs)
|
||||
{
|
||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
||||
|
||||
/* Disable this as fbPolyArc can call miZeroPolyArc which in turn
|
||||
* can call accelerated functions, that as yet, haven't been notified
|
||||
* with exaFinishAccess().
|
||||
*/
|
||||
#if 0
|
||||
if (pGC->lineWidth == 0)
|
||||
{
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
|
@ -197,6 +211,7 @@ ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC,
|
|||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
miPolyArc (pDrawable, pGC, narcs, pArcs);
|
||||
}
|
||||
|
||||
|
@ -250,25 +265,14 @@ ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap,
|
|||
exaDrawableLocation(&pBitmap->drawable),
|
||||
exaDrawableLocation(pDrawable)));
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
exaPrepareAccess (&pBitmap->drawable, EXA_PREPARE_SRC);
|
||||
exaPrepareAccessGC (pGC);
|
||||
fbPushPixels (pGC, pBitmap, pDrawable, w, h, x, y);
|
||||
exaFinishAccessGC (pGC);
|
||||
exaFinishAccess (&pBitmap->drawable, EXA_PREPARE_SRC);
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckGetImage (DrawablePtr pDrawable,
|
||||
int x, int y, int w, int h,
|
||||
unsigned int format, unsigned long planeMask,
|
||||
char *d)
|
||||
{
|
||||
EXA_FALLBACK(("from %p (%c)\n", pDrawable,
|
||||
exaDrawableLocation(pDrawable)));
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_SRC);
|
||||
fbGetImage (pDrawable, x, y, w, h, format, planeMask, d);
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckGetSpans (DrawablePtr pDrawable,
|
||||
int wMax,
|
||||
|
@ -283,21 +287,6 @@ ExaCheckGetSpans (DrawablePtr pDrawable,
|
|||
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);
|
||||
fbPaintWindow (pWin, pRegion, what);
|
||||
exaFinishAccess (&pWin->drawable, EXA_PREPARE_DEST);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckComposite (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
|
@ -312,9 +301,30 @@ ExaCheckComposite (CARD8 op,
|
|||
CARD16 width,
|
||||
CARD16 height)
|
||||
{
|
||||
RegionRec region;
|
||||
int xoff, yoff;
|
||||
|
||||
REGION_NULL(pScreen, ®ion);
|
||||
|
||||
if (!exaOpReadsDestination(op)) {
|
||||
if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst,
|
||||
xSrc, ySrc, xMask, yMask, xDst, yDst,
|
||||
width, height))
|
||||
return;
|
||||
|
||||
exaGetDrawableDeltas (pDst->pDrawable,
|
||||
exaGetDrawablePixmap(pDst->pDrawable),
|
||||
&xoff, &yoff);
|
||||
|
||||
REGION_TRANSLATE(pScreen, ®ion, xoff, yoff);
|
||||
|
||||
exaPrepareAccessReg (pDst->pDrawable, EXA_PREPARE_DEST, ®ion);
|
||||
} else
|
||||
exaPrepareAccess (pDst->pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
EXA_FALLBACK(("from picts %p/%p to pict %p\n",
|
||||
pSrc, pMask, pDst));
|
||||
exaPrepareAccess (pDst->pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
if (pSrc->pDrawable != NULL)
|
||||
exaPrepareAccess (pSrc->pDrawable, EXA_PREPARE_SRC);
|
||||
if (pMask && pMask->pDrawable != NULL)
|
||||
|
@ -336,6 +346,8 @@ ExaCheckComposite (CARD8 op,
|
|||
if (pSrc->pDrawable != NULL)
|
||||
exaFinishAccess (pSrc->pDrawable, EXA_PREPARE_SRC);
|
||||
exaFinishAccess (pDst->pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
REGION_UNINIT(pScreen, ®ion);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -351,21 +363,28 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap)
|
|||
void *fb;
|
||||
Bool need_finish = FALSE;
|
||||
BoxRec box;
|
||||
ExaMigrationRec pixmaps[1];
|
||||
RegionRec migration;
|
||||
ExaPixmapPriv (pPixmap);
|
||||
Bool sys_valid = !miPointInRegion(&pExaPixmap->validSys, 0, 0, &box);
|
||||
Bool damaged = miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0,
|
||||
&box);
|
||||
Bool offscreen = exaPixmapIsOffscreen(pPixmap);
|
||||
|
||||
fb = pExaPixmap->sys_ptr;
|
||||
|
||||
/* Try to avoid framebuffer readbacks */
|
||||
if (exaPixmapIsOffscreen(pPixmap) &&
|
||||
miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box))
|
||||
if ((!offscreen && !sys_valid && !damaged) ||
|
||||
(offscreen && (!sys_valid || damaged)))
|
||||
{
|
||||
box.x1 = 0;
|
||||
box.y1 = 0;
|
||||
box.x2 = 1;
|
||||
box.y2 = 1;
|
||||
REGION_INIT(pScreen, &migration, &box, 1);
|
||||
|
||||
need_finish = TRUE;
|
||||
pixmaps[0].as_dst = FALSE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
pixmaps[0].pPix = pPixmap;
|
||||
exaDoMigration (pixmaps, 1, FALSE);
|
||||
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
|
||||
exaPrepareAccessReg(&pPixmap->drawable, EXA_PREPARE_SRC, &migration);
|
||||
fb = pPixmap->devPrivate.ptr;
|
||||
}
|
||||
|
||||
|
@ -381,8 +400,10 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap)
|
|||
break;
|
||||
}
|
||||
|
||||
if (need_finish)
|
||||
if (need_finish) {
|
||||
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||
REGION_UNINIT(pScreen, &migration);
|
||||
}
|
||||
|
||||
return pixel;
|
||||
}
|
||||
|
|
4
fb/fb.h
4
fb/fb.h
|
@ -2091,10 +2091,6 @@ fbFillRegionTiled (DrawablePtr pDrawable,
|
|||
RegionPtr pRegion,
|
||||
PixmapPtr pTile);
|
||||
|
||||
void
|
||||
fbPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
|
||||
pixman_image_t *image_from_pict (PicturePtr pict,
|
||||
Bool has_clip);
|
||||
void free_pixman_pict (PicturePtr, pixman_image_t *);
|
||||
|
|
|
@ -277,16 +277,6 @@ fbOverlayWindowExposures (WindowPtr pWin,
|
|||
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
|
||||
fbOverlaySetupScreen(ScreenPtr pScreen,
|
||||
pointer pbits1,
|
||||
|
@ -434,7 +424,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
|||
pScreen->CreateWindow = fbOverlayCreateWindow;
|
||||
pScreen->WindowExposures = fbOverlayWindowExposures;
|
||||
pScreen->CopyWindow = fbOverlayCopyWindow;
|
||||
pScreen->PaintWindowBorder = fbOverlayPaintWindow;
|
||||
#ifdef FB_24_32BIT
|
||||
if (bpp == 24 && imagebpp == 32)
|
||||
{
|
||||
|
|
|
@ -92,10 +92,6 @@ fbOverlayWindowExposures (WindowPtr pWin,
|
|||
RegionPtr prgn,
|
||||
RegionPtr other_exposed);
|
||||
|
||||
void
|
||||
fbOverlayPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
|
||||
Bool
|
||||
fbOverlaySetupScreen(ScreenPtr pScreen,
|
||||
pointer pbits1,
|
||||
|
|
|
@ -94,8 +94,6 @@ typedef struct {
|
|||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
CreateWindowProcPtr CreateWindow;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
PaintWindowProcPtr PaintWindowBackground;
|
||||
PaintWindowProcPtr PaintWindowBorder;
|
||||
WindowExposuresProcPtr WindowExposures;
|
||||
CreateGCProcPtr CreateGC;
|
||||
CreateColormapProcPtr CreateColormap;
|
||||
|
@ -786,70 +784,6 @@ xxWindowExposures (WindowPtr pWin,
|
|||
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
|
||||
xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
|
||||
xxCmapPrivPtr pCmapPriv)
|
||||
|
@ -1149,8 +1083,6 @@ xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sy
|
|||
wrap (pScrPriv, pScreen, CreateScreenResources, xxCreateScreenResources);
|
||||
wrap (pScrPriv, pScreen, CreateWindow, xxCreateWindow);
|
||||
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 ? */
|
||||
wrap (pScrPriv, pScreen, WindowExposures, xxWindowExposures);
|
||||
#endif
|
||||
|
|
|
@ -122,8 +122,6 @@ fbSetupScreen(ScreenPtr pScreen,
|
|||
pScreen->ChangeWindowAttributes = fbChangeWindowAttributes;
|
||||
pScreen->RealizeWindow = fbMapWindow;
|
||||
pScreen->UnrealizeWindow = fbUnmapWindow;
|
||||
pScreen->PaintWindowBackground = fbPaintWindow;
|
||||
pScreen->PaintWindowBorder = fbPaintWindow;
|
||||
pScreen->CopyWindow = fbCopyWindow;
|
||||
pScreen->CreatePixmap = fbCreatePixmap;
|
||||
pScreen->DestroyPixmap = fbDestroyPixmap;
|
||||
|
|
|
@ -315,58 +315,3 @@ fbFillRegionTiled (DrawablePtr pDrawable,
|
|||
fbFinishAccess (&pTile->drawable);
|
||||
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 fbOverlayGetScreenPrivateKey wfbOverlayGetScreenPrivateKey
|
||||
#define fbOverlayPaintKey wfbOverlayPaintKey
|
||||
#define fbOverlayPaintWindow wfbOverlayPaintWindow
|
||||
#define fbOverlayScreenPrivateKey wfbOverlayScreenPrivateKey
|
||||
#define fbOverlaySetupScreen wfbOverlaySetupScreen
|
||||
#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion
|
||||
#define fbOverlayWindowExposures wfbOverlayWindowExposures
|
||||
#define fbOverlayWindowLayer wfbOverlayWindowLayer
|
||||
#define fbPadPixmap wfbPadPixmap
|
||||
#define fbPaintWindow wfbPaintWindow
|
||||
#define fbPictureInit wfbPictureInit
|
||||
#define fbPixmapToRegion wfbPixmapToRegion
|
||||
#define fbPolyArc wfbPolyArc
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
if DMX
|
||||
if BUILD_DARWIN
|
||||
if XDARWIN
|
||||
# Darwin does not need the dmx subdir
|
||||
else
|
||||
DMX_SUBDIRS = dmx
|
||||
|
@ -7,12 +7,8 @@ endif
|
|||
endif
|
||||
|
||||
if XORG
|
||||
if BUILD_DARWIN
|
||||
# Darwin does not need the xfree86 subdir
|
||||
else
|
||||
XORG_SUBDIRS = xfree86
|
||||
endif
|
||||
endif
|
||||
|
||||
if XVFB
|
||||
XVFB_SUBDIRS = vfb
|
||||
|
@ -38,15 +34,15 @@ if XPRINT
|
|||
XPRINT_SUBDIRS = xprint
|
||||
endif
|
||||
|
||||
if BUILD_DARWIN
|
||||
DARWIN_SUBDIRS = darwin
|
||||
if XDARWIN
|
||||
XDARWIN_SUBDIRS = darwin
|
||||
endif
|
||||
|
||||
SUBDIRS = \
|
||||
$(XORG_SUBDIRS) \
|
||||
$(XGL_SUBDIRS) \
|
||||
$(XWIN_SUBDIRS) \
|
||||
$(DARWIN_SUBDIRS) \
|
||||
$(XDARWIN_SUBDIRS) \
|
||||
$(XVFB_SUBDIRS) \
|
||||
$(XNEST_SUBDIRS) \
|
||||
$(DMX_SUBDIRS) \
|
||||
|
|
|
@ -56,34 +56,29 @@ Xquartz_SOURCES = \
|
|||
quartz/xpr/x-hook.c \
|
||||
quartz/xpr/x-list.c
|
||||
|
||||
XDarwin_LDADD = \
|
||||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/dix/libdix.la \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
./libdarwinShared.a \
|
||||
./iokit/libiokit.a \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
$(XSERVER_LIBS)
|
||||
DARWIN_LIBS = \
|
||||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
@DARWIN_LIBS@ \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
./libdarwinShared.a \
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
Xquartz_LDADD = \
|
||||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/dix/libdix.la \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
./libdarwinShared.a \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
$(XSERVER_LIBS) -lXplugin
|
||||
XDARWIN_LIBS = \
|
||||
$(DARWIN_LIBS) \
|
||||
./iokit/libiokit.a
|
||||
XQUARTZ_LIBS = \
|
||||
$(DARWIN_LIBS)
|
||||
|
||||
XDarwin_DEPENDENCIES = $(XDARWIN_LIBS)
|
||||
XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS)
|
||||
|
||||
Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS)
|
||||
Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
|
||||
|
||||
XDarwin_LDFLAGS = \
|
||||
-XCClinker -Objc \
|
||||
|
@ -95,6 +90,7 @@ Xquartz_LDFLAGS = \
|
|||
-Wl,-u,_miDCInitialize \
|
||||
-Wl,-framework,Carbon \
|
||||
-Wl,-framework,OpenGL \
|
||||
-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib \
|
||||
-Wl,-framework,Cocoa \
|
||||
-Wl,-framework,CoreAudio \
|
||||
-Wl,-framework,IOKit
|
||||
|
@ -118,22 +114,15 @@ XDarwinApp_SOURCES = \
|
|||
$(top_srcdir)/mi/miinitext.c \
|
||||
$(top_srcdir)/Xi/stubs.c
|
||||
|
||||
XDarwinApp_LDADD = \
|
||||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/dix/libdix.la \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
$(top_builddir)/os/libos.la \
|
||||
./quartz/XApplication.o \
|
||||
./libdarwinShared.a \
|
||||
./quartz/libXQuartz.a \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
$(XSERVER_LIBS)
|
||||
XDARWINAPP_LIBS = \
|
||||
$(DARWIN_LIBS) \
|
||||
./quartz/XApplication.o \
|
||||
./libdarwinShared.a \
|
||||
./quartz/libXQuartz.a \
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
XDarwinApp_DEPENDENCIES = $(XDARWINAPP_LIBS)
|
||||
XDarwinApp_LDADD = $(XDARWINAPP_LIBS) $(XSERVER_SYS_LIBS)
|
||||
|
||||
XDarwinApp_LDFLAGS = \
|
||||
-XCClinker -Objc \
|
||||
|
@ -163,6 +152,7 @@ cr_la_LIBADD = \
|
|||
$(top_builddir)/miext/rootless/accel/librlAccel.la
|
||||
|
||||
cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
|
||||
-lpixman-1 \
|
||||
-Wl,-framework,Cocoa \
|
||||
-Wl,-framework,Carbon \
|
||||
-XCClinker -ObjC \
|
||||
|
@ -201,7 +191,7 @@ glxMesa_la_DEPENDENCIES = XDarwinApp
|
|||
endif
|
||||
|
||||
endif
|
||||
if HAVE_X_PLUGIN
|
||||
if HAVE_XPLUGIN
|
||||
|
||||
xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
|
||||
xprplugin_LTLIBRARIES = xpr.la
|
||||
|
@ -222,6 +212,7 @@ xpr_la_LIBADD = \
|
|||
$(top_builddir)/miext/rootless/accel/librlAccel.la
|
||||
|
||||
xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
|
||||
-lpixman-1 \
|
||||
-lXplugin \
|
||||
-XCClinker -bundle_loader -XCClinker XDarwinApp \
|
||||
-module -avoid-version -no-undefined
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
# include "micmap.h"
|
||||
#undef BOOL
|
||||
|
||||
#include "xf86Version.h"
|
||||
//#include "xf86Version.h"
|
||||
|
||||
#include <mach/mach.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
**************************************************************/
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
|
||||
* Copyright (c) 2007 Apple Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -46,8 +47,6 @@
|
|||
#include "fb.h" // fb framebuffer code
|
||||
#include "site.h"
|
||||
#include "globals.h"
|
||||
#include "xorgVersion.h"
|
||||
#include "xf86Date.h"
|
||||
#include "dix.h"
|
||||
|
||||
#ifdef XINPUT
|
||||
|
@ -83,7 +82,7 @@ int darwinScreenIndex = 0;
|
|||
io_connect_t darwinParamConnect = 0;
|
||||
int darwinEventReadFD = -1;
|
||||
int darwinEventWriteFD = -1;
|
||||
int darwinMouseAccelChange = 1;
|
||||
// int darwinMouseAccelChange = 1;
|
||||
int darwinFakeButtons = 0;
|
||||
|
||||
// location of X11's (0,0) point in global screen coordinates
|
||||
|
@ -127,86 +126,23 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]);
|
|||
#ifndef PRE_RELEASE
|
||||
#define PRE_RELEASE XORG_VERSION_SNAP
|
||||
#endif
|
||||
|
||||
void
|
||||
DarwinPrintBanner()
|
||||
{
|
||||
#if PRE_RELEASE
|
||||
ErrorF("\n"
|
||||
"This is a pre-release version of the " XVENDORNAME " X11.\n"
|
||||
"Portions of this release are based on XFree86 4.4RC2 and selected\n"
|
||||
"files from XFree86 4.4RC3. It is not supported in any way.\n"
|
||||
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
|
||||
"Select the \"xorg\" product for bugs you find in this release.\n"
|
||||
"Before reporting bugs in pre-release versions please check the\n"
|
||||
"latest version in the " XVENDORNAME " \"monolithic tree\" CVS\n"
|
||||
"repository hosted at http://www.freedesktop.org/Software/xorg/");
|
||||
#ifndef BUILD_DATE
|
||||
#define BUILD_DATE ""
|
||||
#endif
|
||||
#if XORG_VERSION_SNAP > 0
|
||||
ErrorF(".%d", XORG_VERSION_SNAP);
|
||||
#ifndef XORG_RELEASE
|
||||
#define XORG_RELEASE "?"
|
||||
#endif
|
||||
|
||||
#if XORG_VERSION_SNAP >= 900
|
||||
ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1,
|
||||
XORG_VERSION_SNAP - 900);
|
||||
#endif
|
||||
|
||||
#ifdef XORG_CUSTOM_VERSION
|
||||
ErrorF(" (%s)", XF86_CUSTOM_VERSION);
|
||||
#endif
|
||||
ErrorF("\nRelease Date: %s\n", XF86_DATE);
|
||||
ErrorF("X Protocol Version %d, Revision %d, %s\n",
|
||||
X_PROTOCOL, X_PROTOCOL_REVISION, XORG_RELEASE );
|
||||
ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR);
|
||||
#ifdef HAS_UTSNAME
|
||||
{
|
||||
struct utsname name;
|
||||
|
||||
if (uname(&name) == 0) {
|
||||
ErrorF("Current Operating System: %s %s %s %s %s\n",
|
||||
name.sysname, name.nodename, name.release, name.version, name.machine);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(BUILD_DATE) && (BUILD_DATE > 19000000)
|
||||
{
|
||||
struct tm t;
|
||||
char buf[100];
|
||||
|
||||
bzero(&t, sizeof(t));
|
||||
bzero(buf, sizeof(buf));
|
||||
t.tm_mday = BUILD_DATE % 100;
|
||||
t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
|
||||
t.tm_year = BUILD_DATE / 10000 - 1900;
|
||||
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
|
||||
ErrorF("Build Date: %s\n", buf);
|
||||
}
|
||||
#endif
|
||||
#if defined(CLOG_DATE) && (CLOG_DATE > 19000000)
|
||||
{
|
||||
struct tm t;
|
||||
char buf[100];
|
||||
|
||||
bzero(&t, sizeof(t));
|
||||
bzero(buf, sizeof(buf));
|
||||
t.tm_mday = CLOG_DATE % 100;
|
||||
t.tm_mon = (CLOG_DATE / 100) % 100 - 1;
|
||||
t.tm_year = CLOG_DATE / 10000 - 1900;
|
||||
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
|
||||
ErrorF("Changelog Date: %s\n", buf);
|
||||
}
|
||||
#endif
|
||||
#if defined(BUILDERSTRING)
|
||||
ErrorF("%s \n",BUILDERSTRING);
|
||||
#endif
|
||||
ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n"
|
||||
"\tto make sure that you have the latest version.\n");
|
||||
void DDXRingBell(int volume, int pitch, int duration) {
|
||||
// FIXME -- make some noise, yo
|
||||
}
|
||||
|
||||
|
||||
void DDXRingBell(int volume, int pitch, int duration)
|
||||
{
|
||||
// FIXME -- make some noise, yo
|
||||
void
|
||||
DarwinPrintBanner(void)
|
||||
{
|
||||
// this should change depending on which specific server we are building
|
||||
ErrorF("X11.app starting:\n");
|
||||
ErrorF("Xquartz server based on X.org %s, built on %s\n", XORG_RELEASE, BUILD_DATE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -359,8 +295,8 @@ static Bool DarwinAddScreen(
|
|||
dixScreenOrigins[index].x = dfb->x;
|
||||
dixScreenOrigins[index].y = dfb->y;
|
||||
|
||||
ErrorF("Screen %d added: %dx%d @ (%d,%d)\n",
|
||||
index, dfb->width, dfb->height, dfb->x, dfb->y);
|
||||
/* ErrorF("Screen %d added: %dx%d @ (%d,%d)\n",
|
||||
index, dfb->width, dfb->height, dfb->x, dfb->y); */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -373,6 +309,7 @@ static Bool DarwinAddScreen(
|
|||
=============================================================================
|
||||
*/
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* DarwinChangePointerControl
|
||||
* Set mouse acceleration and thresholding
|
||||
|
@ -393,7 +330,7 @@ static void DarwinChangePointerControl(
|
|||
if (kr != KERN_SUCCESS)
|
||||
ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* DarwinMouseProc
|
||||
|
@ -416,12 +353,11 @@ static int DarwinMouseProc(
|
|||
map[3] = 3;
|
||||
map[4] = 4;
|
||||
map[5] = 5;
|
||||
InitPointerDeviceStruct( (DevicePtr)pPointer,
|
||||
map,
|
||||
5, // numbuttons (4 & 5 are scroll wheel)
|
||||
GetMotionHistory,
|
||||
DarwinChangePointerControl,
|
||||
GetMotionHistorySize(), 2 );
|
||||
InitPointerDeviceStruct( (DevicePtr)pPointer, map, 5,
|
||||
GetMotionHistory,
|
||||
(PtrCtrlProcPtr)NoopDDA,
|
||||
GetMotionHistorySize(), 2);
|
||||
|
||||
#ifdef XINPUT
|
||||
InitValuatorAxisStruct( pPointer,
|
||||
0, // X axis
|
||||
|
@ -643,8 +579,8 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
|
|||
for (i = 0; i < pScreenInfo->numScreens; i++) {
|
||||
dixScreenOrigins[i].x -= darwinMainScreenX;
|
||||
dixScreenOrigins[i].y -= darwinMainScreenY;
|
||||
ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n",
|
||||
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y);
|
||||
/* ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n",
|
||||
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -725,10 +661,6 @@ void OsVendorInit(void)
|
|||
}
|
||||
darwinKeymapFile = tempStr;
|
||||
}
|
||||
|
||||
if ( !darwinKeymapFile ) {
|
||||
ErrorF("Reading keymap from the system.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -926,7 +858,7 @@ void ddxUseMsg( void )
|
|||
*/
|
||||
void ddxGiveUp( void )
|
||||
{
|
||||
ErrorF( "Quitting XDarwin...\n" );
|
||||
ErrorF( "Quitting XQuartz...\n" );
|
||||
|
||||
DarwinModeGiveUp();
|
||||
}
|
||||
|
@ -949,7 +881,6 @@ void AbortDDX( void )
|
|||
}
|
||||
|
||||
|
||||
#ifdef DPMSExtension
|
||||
/*
|
||||
* DPMS extension stubs
|
||||
*/
|
||||
|
@ -966,8 +897,6 @@ int DPMSGet(int *level)
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#include "mivalidate.h" // for union _Validate used by windowstr.h
|
||||
#include "windowstr.h" // for struct _Window
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef struct {
|
|||
|
||||
|
||||
// From darwin.c
|
||||
void DarwinPrintBanner();
|
||||
void DarwinPrintBanner(void);
|
||||
int DarwinParseModifierList(const char *constmodifiers);
|
||||
void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
|
||||
void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
|
||||
|
|
|
@ -62,8 +62,8 @@
|
|||
#define NO_CFPLUGIN
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOKit/hidsystem/IOHIDShared.h>
|
||||
#include <IOKit/hidsystem/event_status_driver.h>
|
||||
#include <IOKit/graphics/IOGraphicsLib.h>
|
||||
#include <drivers/event_status_driver.h>
|
||||
|
||||
// Define this to work around bugs in the display drivers for
|
||||
// older PowerBook G3's. If the X server starts without this
|
||||
|
|
|
@ -5,7 +5,7 @@ AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
|
|||
|
||||
INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@
|
||||
AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API
|
||||
if HAVE_X_PLUGIN
|
||||
if HAVE_XPLUGIN
|
||||
AM_DEFS += -DBUILD_XPR
|
||||
endif
|
||||
DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\"
|
||||
|
|
|
@ -356,7 +356,7 @@ static NSString *X11EnableKeyEquivalentsKey = @"EnableKeyEquivalents";
|
|||
[[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange
|
||||
forKey:@"AllowMouseAccelChange"];
|
||||
// Update the setting used by the X server thread
|
||||
darwinMouseAccelChange = newMouseAccelChange;
|
||||
// darwinMouseAccelChange = newMouseAccelChange;
|
||||
}
|
||||
|
||||
+ (void)setUseQDCursor:(int)newUseQDCursor
|
||||
|
|
|
@ -43,6 +43,9 @@ Equipment Corporation.
|
|||
#include <X11/extensions/panoramiXproto.h>
|
||||
#include "globals.h"
|
||||
|
||||
extern int noPseudoramiXExtension;
|
||||
extern int noPanoramiXExtension;
|
||||
|
||||
extern int ProcPanoramiXQueryVersion (ClientPtr client);
|
||||
|
||||
static void PseudoramiXResetProc(ExtensionEntry *extEntry);
|
||||
|
|
|
@ -209,7 +209,7 @@ static void QuartzUpdateScreens(void)
|
|||
pRoot = WindowTable[pScreen->myNum];
|
||||
AppleWMSetScreenOrigin(pRoot);
|
||||
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
|
||||
pScreen->PaintWindowBackground(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
||||
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
||||
// QuartzIgnoreNextWarpCursor();
|
||||
DefineInitialRootWindow(pRoot);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void QuartzReadPreferences(void)
|
|||
darwinFakeButtons = [Preferences fakeButtons];
|
||||
darwinFakeMouse2Mask = [Preferences button2Mask];
|
||||
darwinFakeMouse3Mask = [Preferences button3Mask];
|
||||
darwinMouseAccelChange = [Preferences mouseAccelChange];
|
||||
// darwinMouseAccelChange = [Preferences mouseAccelChange];
|
||||
quartzUseSysBeep = [Preferences systemBeep];
|
||||
quartzEnableKeyEquivalents = [Preferences enableKeyEquivalents];
|
||||
|
||||
|
|
|
@ -306,9 +306,6 @@ static Bool
|
|||
xprSetupScreen(int index, ScreenPtr pScreen)
|
||||
{
|
||||
// Add alpha protecting replacements for fb screen functions
|
||||
pScreen->PaintWindowBackground = SafeAlphaPaintWindow;
|
||||
pScreen->PaintWindowBorder = SafeAlphaPaintWindow;
|
||||
|
||||
#ifdef RENDER
|
||||
{
|
||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#if !defined(DUMPKEYMAP_FILE_ONLY)
|
||||
#include <drivers/event_status_driver.h>
|
||||
#include <IOKit/hidsystem/event_status_driver.h>
|
||||
#endif
|
||||
|
||||
#define PROG_NAME "dumpkeymap"
|
||||
|
|
|
@ -81,13 +81,16 @@ Xdmx_SOURCES = dmx.c \
|
|||
#Xdmx_SOURCES += fakecw.c
|
||||
#endif
|
||||
|
||||
XDMX_LIBS = \
|
||||
@XDMX_LIBS@ \
|
||||
$(GLX_LIBS) \
|
||||
input/libdmxinput.a \
|
||||
config/libdmxconfig.a \
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
|
||||
Xdmx_LDADD = $(XORG_CORE_LIBS) \
|
||||
$(XDMX_LIBS) \
|
||||
$(GLX_LIBS) \
|
||||
input/libdmxinput.a \
|
||||
config/libdmxconfig.a \
|
||||
@DMXMODULES_LIBS@
|
||||
Xdmx_DEPENDENCIES= $(XDMX_LIBS)
|
||||
Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS)
|
||||
|
||||
# Man page
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
|
|
|
@ -209,8 +209,6 @@ typedef struct _DMXScreenInfo {
|
|||
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||
RestackWindowProcPtr RestackWindow;
|
||||
WindowExposuresProcPtr WindowExposures;
|
||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
|
||||
ResizeWindowProcPtr ResizeWindow;
|
||||
|
|
|
@ -105,3 +105,14 @@ void dmxUpdateWindowInfo(DMXUpdateType type, WindowPtr pWindow)
|
|||
if (!dmxInput->detached && dmxInput->updateWindowInfo)
|
||||
dmxInput->updateWindowInfo(dmxInput, type, pWindow);
|
||||
}
|
||||
|
||||
int
|
||||
NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
|
||||
{
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
void
|
||||
DeleteInputDeviceRequest(DeviceIntPtr pDev)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -314,9 +314,6 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
|
|||
DMX_WRAP(UnrealizeWindow, dmxUnrealizeWindow, dmxScreen, pScreen);
|
||||
DMX_WRAP(RestackWindow, dmxRestackWindow, 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(ResizeWindow, dmxResizeWindow, dmxScreen, pScreen);
|
||||
|
@ -453,8 +450,6 @@ Bool dmxCloseScreen(int idx, ScreenPtr pScreen)
|
|||
DMX_UNWRAP(UnrealizeWindow, dmxScreen, pScreen);
|
||||
DMX_UNWRAP(RestackWindow, dmxScreen, pScreen);
|
||||
DMX_UNWRAP(WindowExposures, dmxScreen, pScreen);
|
||||
DMX_UNWRAP(PaintWindowBackground, dmxScreen, pScreen);
|
||||
DMX_UNWRAP(PaintWindowBorder, dmxScreen, pScreen);
|
||||
DMX_UNWRAP(CopyWindow, dmxScreen, pScreen);
|
||||
|
||||
DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen);
|
||||
|
|
|
@ -795,57 +795,6 @@ void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn,
|
|||
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
|
||||
* is on or offscreen, and realize it if it is newly on screen and the
|
||||
* lazy window creation optimization is enabled. */
|
||||
|
|
|
@ -81,10 +81,6 @@ extern Bool dmxUnrealizeWindow(WindowPtr pWindow);
|
|||
extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib);
|
||||
extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn,
|
||||
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,
|
||||
RegionPtr prgnSrc);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
if KDRIVEVESA
|
||||
VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \
|
||||
VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga nvidia pm2 r128 \
|
||||
smi via
|
||||
endif
|
||||
|
||||
|
|
|
@ -1,622 +0,0 @@
|
|||
2006-02-15 Keith Packard <keithp@keithp.com>
|
||||
|
||||
* Makefile.am:
|
||||
* ati.c: (ATIMapReg):
|
||||
* ati.h:
|
||||
* ati_cursor.c: (ATIMoveCursor), (ClassicSetCursorColors),
|
||||
(ClassicLoadCursor), (RadeonLoadCursor), (ATIUnloadCursor):
|
||||
Fix kdrive pointer signed/unsigned types.
|
||||
|
||||
2006-02-14 Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* ati_draw.c: (ATIDrawDisable):
|
||||
Remove the waitSync from KdDisableScreen and push it off to drivers'
|
||||
disableAccel hook, which is more correct anyway. This makes kdrive.c
|
||||
not have any knowledge of kaa, opening the way for using exa from
|
||||
kdrive.
|
||||
|
||||
2006-02-09 Keith Packard <keithp@keithp.com>
|
||||
|
||||
reviewed by: Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* ati_video.c: (RadeonDisplayVideo):
|
||||
Replace TRI_FAN with RECT_LIST to eliminate tearing
|
||||
|
||||
2005-08-07 Keith Packard <keithp@keithp.com>
|
||||
|
||||
* ati_video.c: (RadeonDisplayVideo):
|
||||
Build with modular X libraries and headers
|
||||
|
||||
2005-06-09 Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* ati.h:
|
||||
* ati_video.c:
|
||||
Axe a few dead fields from the port priv struct and add my name to
|
||||
the "Copyright" line of the license to ati_video.c that already has my
|
||||
name in the text.
|
||||
|
||||
2005-06-09 Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* ati_dri.c:
|
||||
Perform a warnings sweep on hw/kdrive. A number of these were my fault,
|
||||
but some come from others.
|
||||
|
||||
2005-06-09 Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* ati.c:
|
||||
* ati.h:
|
||||
* ati_draw.c: (ATIWaitMarker), (ATIGetOffsetPitch),
|
||||
(ATIUploadToScreen), (ATIUploadToScratch), (ATIDrawInit),
|
||||
(ATIDrawEnable):
|
||||
* ati_dri.c: (ATIDRISwapContext):
|
||||
* ati_video.c: (R128DisplayVideo), (RadeonDisplayVideo):
|
||||
- Replace the syncAccel hook in the kdrive structure with a pair of
|
||||
hooks in the kaa structure: markSync and waitMarker. The first, if
|
||||
set, returns a hardware-dependent marker number which can then be
|
||||
waited for with waitMarker. If markSync is absent (which is the case
|
||||
on all drivers currently), waitMarker must wait for idle on any given
|
||||
marker number. The intention is to allow for more parallelism when
|
||||
we get downloading from framebuffer, or more fine-grained idling.
|
||||
- Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and
|
||||
kaaWaitSync. These will need to be refined when KAA starts being
|
||||
smart about using them. Merge kpict.c into kasync.c since kasyn.c has
|
||||
all the rest of these fallback funcs.
|
||||
- Restructure all drivers to initialize a KaaInfo structure by hand
|
||||
rather than statically in dubious order.
|
||||
- Whack the i810 driver into shape in hopes that it'll work after this
|
||||
change (it certainly wouldn't have before this). Doesn't support my
|
||||
i845 though.
|
||||
- Make a new KXV helper to avoid duplicated code to fill the region
|
||||
with the necessary color key. Use it in i810 and mach64 (tested).
|
||||
|
||||
2005-02-28 Keith Packard <keithp@keithp.com>
|
||||
|
||||
* ati_reg.h:
|
||||
Add macrovision register defines
|
||||
|
||||
2005-01-24 19:37 anholt
|
||||
|
||||
* ati_dma.c, ati_draw.c, ati_reg.h: Finish converting RB2D_DSTCACHE
|
||||
to RB3D_DSTCACHE. Remove an extra pixel cache flush in the idle
|
||||
function. Init an extra reg for r200, and annotate the
|
||||
TCL_BYPASS better. Also, clean up some style nits from the last
|
||||
commit.
|
||||
|
||||
2005-01-24 18:39 keithp
|
||||
|
||||
* ati.h, ati_draw.c, ati_reg.h, radeon_composite.c: Add tracing.
|
||||
Hack Radeon cache registers to use 3D addresses. Works on M6
|
||||
|
||||
2005-01-24 17:38 anholt
|
||||
|
||||
* ati_dri.c: Silence a warning about uninitialized variable (though
|
||||
it would be).
|
||||
|
||||
2005-01-20 08:22 anholt
|
||||
|
||||
* ati_dma.c, ati_dma.h, ati_dri.c: Add a set of macros for dealing
|
||||
with the repeated code to wait for a while reading a
|
||||
register/attempting DMA. Now it'll wait for a certain number of
|
||||
seconds rather than a certain number of times through the loop
|
||||
before deciding that it's timed out and resetting the hardware.
|
||||
Also, add more timeout handling, and reset the draw state after
|
||||
resetting the engine.
|
||||
|
||||
2005-01-19 23:28 anholt
|
||||
|
||||
* radeon_composite.c: Use RadeonSwitchTo3D() instead of doing the
|
||||
WAIT_UNTIL ourselves (RST3D() also does DC_FLUSH, which may be
|
||||
important).
|
||||
|
||||
2005-01-19 23:09 anholt
|
||||
|
||||
* ati_video.c: Add R200 XV support, and make R100 (hopefully) use
|
||||
linear filtering instead of nearest. Also, use RadeonSwitchTo3D
|
||||
instead of doing the WAIT_UNTIL ourselves.
|
||||
|
||||
2005-01-19 17:09 anholt
|
||||
|
||||
* ati_dma.c, ati_reg.h: Make R200 PDMA work -- primary queue sizes
|
||||
are now 9 bits, not 8.
|
||||
|
||||
2004-12-22 10:39 anholt
|
||||
|
||||
* ati_draw.c, ati_reg.h, radeon_composite.c: Back out the previous
|
||||
day's broken R200 "fix" -- the same number of coords are always
|
||||
emitted. Fix the real problem, which was not enough regs being
|
||||
initialized in ati_draw.c. Fix a typo that was resulting in
|
||||
alpha coming out as 0 * src or 0 * broken instead of src * 1 or
|
||||
src * mask. Assign the blending results to R0, as appears to be
|
||||
necessary. Unbreak the dst-alpha-blend-with-no-dst-alpha code.
|
||||
Yow. And set the right DMA count for the r200 traps code.
|
||||
|
||||
2004-12-21 01:51 anholt
|
||||
|
||||
* ati_draw.c, radeon_composite.c: Fix r200 render (for real this
|
||||
time?) by setting tex1_comp_cnt right for non-mask rendering.
|
||||
Reenable it. Also, R200TexFormats was used instead of R100 in
|
||||
one place. Harmless so far, because the formats were in the same
|
||||
order.
|
||||
|
||||
2004-12-21 01:49 anholt
|
||||
|
||||
* ati_dri.c: Whitespace nit.
|
||||
|
||||
2004-09-19 20:12 anholt
|
||||
|
||||
* ati_draw.c, ati_reg.h, radeon_composite.c: Fix the R200 Render
|
||||
code. Composite and Trapezoids are now supported just as well as
|
||||
on R100.
|
||||
|
||||
2004-09-19 03:57 anholt
|
||||
|
||||
* ati_dri.c, ati_reg.h: Unbreak the AGP DRI case. That was quite a
|
||||
pile of broken code.
|
||||
|
||||
2004-09-13 23:26 anholt
|
||||
|
||||
* ati.c, ati_reg.h: Add proper PCI/AGP detection, based on Mike
|
||||
Harris's code for Radeon, but using the MMIO mirror of the bits
|
||||
instead of config space.
|
||||
|
||||
2004-09-12 16:22 anholt
|
||||
|
||||
* ati_draw.c: - Fix a segfault on VT switch with DRI. Still dies
|
||||
due to cursor allocation troubles. - Move the
|
||||
RemoveBlockAndWakeupHandlers to match
|
||||
RegisterBlockAndWakeupHandlers. - Enable R100 trapezoid
|
||||
"acceleration" when DRI is working, so that it can be exposed
|
||||
and worked on.
|
||||
|
||||
2004-09-12 16:01 anholt
|
||||
|
||||
* ati_dri.c: Fix a bad argument missed in the previous commit for
|
||||
ATIDRIDMA* functions.
|
||||
|
||||
2004-09-12 15:21 anholt
|
||||
|
||||
* ati_draw.c: Move the RegisterBlockAndWakeupHandlers to before DRI
|
||||
initialization. The change to use that instead of manual
|
||||
wrapping made the DMA dispatch come after the lock had been
|
||||
dropped, causing lots of pain.
|
||||
|
||||
2004-09-12 13:31 anholt
|
||||
|
||||
* ati.h, ati_dma.c, ati_dri.c: Reset the CCE/CP on engine reset,
|
||||
and make the ATIDRIDMA functions take a more useful argument.
|
||||
|
||||
2004-09-12 13:19 anholt
|
||||
|
||||
* ati_draw.c: Add missing kaa.h include for kaaInitTrapOffsets.
|
||||
|
||||
2004-09-12 13:02 anholt
|
||||
|
||||
* ati_dri.c: Fix handling of is_agp. is_agp is whether the card is
|
||||
actually AGP, while using_agp should say whether AGP is being
|
||||
used as part of DMA/DRI.
|
||||
|
||||
2004-09-12 12:52 anholt
|
||||
|
||||
* ati_dma.c, ati_dma.h, ati_dri.c: Improve error handling,
|
||||
especially in the DRI case. Do some FatalErrors instead of
|
||||
ErrorFs for things that are really bad, and put limits on some
|
||||
loops. Now, sometimes instead of hanging the entire system, we
|
||||
(mostly-) cleanly drop to console when the card has hung.
|
||||
|
||||
2004-09-11 02:28 anholt
|
||||
|
||||
* ati.h, ati_dma.h, ati_draw.c, ati_draw.h, ati_reg.h,
|
||||
r128_composite.c, radeon_composite.c: - Add disabled WIP
|
||||
trapezoid code for R128 and R100. The R128 rendering is not
|
||||
doing an add of 1 per triangle like I hoped, and instead seems
|
||||
to be saturating all the pixels or something. The R100
|
||||
acceleration renders pretty well, with some gaps. Note that
|
||||
both are slower than software due to lack of DMA to submit
|
||||
vertices. - Mostly fix R128 and Radeon transform support,
|
||||
including supporting bilinear filtering on R128. Subpixel
|
||||
offsets are still probably an issue (reported by rendercheck),
|
||||
but I want to make 100% sure about my understanding of the
|
||||
protocol before changing everybody, including fb. - Add support
|
||||
for dst formats without alpha to R128 Composite. - Remove the
|
||||
R128 Blend code, which has long outlived its usefulness. (I
|
||||
kept it around for one reason: It could be useful for the w/h
|
||||
> 1024 case with no mask and a non-src op. That seems pretty
|
||||
infrequent and not worth the trouble).
|
||||
|
||||
2004-07-24 10:02 keithp
|
||||
|
||||
* ati.c: Check for mmio before restoring crtc/crtc2 pitch registers
|
||||
|
||||
2004-07-22 11:17 keithp
|
||||
|
||||
* ati.c, ati.h, ati_cursor.c, ati_reg.h: 2004-07-22 Keith Packard
|
||||
<keithp@keithp.com>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
||||
* hw/kdrive/ati/ati.c: (ATISetOffscreen), (ATISetPitch),
|
||||
(ATIRandRSetConfig), (ATIPreserve), (ATIRestore),
|
||||
(ATIEnable):
|
||||
* hw/kdrive/ati/ati.h:
|
||||
* hw/kdrive/ati/ati_cursor.c: (RadeonLoadCursor),
|
||||
(ATIUnloadCursor), (ATICursorEnable):
|
||||
* hw/kdrive/ati/ati_reg.h:
|
||||
Correct pitch so that accelerator can run on 1400x1050
|
||||
screens.
|
||||
Add a few more register sets for cursors.
|
||||
|
||||
2004-07-19 05:07 anholt
|
||||
|
||||
* radeon_composite.c: Add support for a8b8g8r8 and x8b8g8r8
|
||||
pictures, which showed up frequently with metacity usage.
|
||||
|
||||
2004-07-19 04:42 anholt
|
||||
|
||||
* ati_cursor.c: Breakage in last commit to this file:
|
||||
pCurPriv->area isn't set up until Enable, these days.
|
||||
|
||||
2004-07-19 04:19 anholt
|
||||
|
||||
* ati_draw.c: Set the right number of texture coordinates for r200
|
||||
Render support (still disabled, needs to be tested).
|
||||
|
||||
2004-07-19 04:16 anholt
|
||||
|
||||
* r128_composite.c, radeon_composite.c: - Add Radeon picture
|
||||
transform support. - On R128, don't refer to an old Composite's
|
||||
mask transform when the current Composite doesn't have a mask.
|
||||
- Staticize some global variables in r128_composite.c.
|
||||
|
||||
2004-07-19 00:53 anholt
|
||||
|
||||
* ati.c, ati.h, ati_cursor.c, ati_draw.c, ati_draw.h: Use the
|
||||
offscreen memory manager as much as possible to do the
|
||||
reservation of memory at startup. Do some drive-by cleanups
|
||||
while I'm here (sorry!).
|
||||
|
||||
2004-07-19 00:20 anholt
|
||||
|
||||
* r128_composite.c: Add support for transforms of textures on R128.
|
||||
|
||||
2004-07-03 03:23 anholt
|
||||
|
||||
* r128_composite.c: Clean up Rage 128 composite code. Now it
|
||||
composites more operations correctly and is simpler.
|
||||
|
||||
2004-06-27 17:48 keithp
|
||||
|
||||
* ati.c, ati.h, ati_cursor.c, ati_draw.c: 2004-06-27 Keith Packard
|
||||
<keithp@keithp.com>
|
||||
|
||||
* hw/kdrive/ati/ati.c: (ATICardInit), (ATISetOffscreen),
|
||||
(ATIScreenInit), (ATIRandRSetConfig), (ATIRandRInit),
|
||||
(ATIFinishInitScreen), (ATIEnable):
|
||||
* hw/kdrive/ati/ati.h:
|
||||
* hw/kdrive/ati/ati_cursor.c: (ATICursorInit):
|
||||
* hw/kdrive/ati/ati_draw.c: (RadeonSwitchTo2D),
|
||||
(RadeonSwitchTo3D),
|
||||
(ATIBlockHandler), (ATIWakeupHandler), (ATIDrawEnable),
|
||||
(ATIDrawDisable), (ATIDrawFini):
|
||||
Separate out off-screen allocation from Init.
|
||||
Fix Enable to update off-screen addresses.
|
||||
Wrap RandR to update off-screen addresses.
|
||||
|
||||
* hw/kdrive/fbdev/fbdev.c: (fbdevMapFramebuffer):
|
||||
Set off_screen_base and memory_size fields correctly.
|
||||
|
||||
2004-06-25 21:13 keithp
|
||||
|
||||
* ati.c, ati_cursor.c, ati_draw.c, ati_reg.h: 2004-06-25 Keith
|
||||
Packard <keithp@keithp.com>
|
||||
|
||||
* hw/kdrive/ati/ati.c: (ATIScreenInit):
|
||||
* hw/kdrive/ati/ati_cursor.c: (ATIMoveCursor),
|
||||
(ClassicAllocCursorColors), (ClassicSetCursorColors),
|
||||
(ClassicRecolorCursor), (ClassicLoadCursor),
|
||||
(RadeonLoadCursor),
|
||||
(ATIRealizeCursor), (ATISetCursor), (ATICursorEnable),
|
||||
(ATIRecolorCursor):
|
||||
* hw/kdrive/ati/ati_draw.c: (ATIDrawFini):
|
||||
* hw/kdrive/ati/ati_reg.h:
|
||||
Add ARGB cursor support for Radeon cards.
|
||||
|
||||
2004-06-10 12:22 anholt
|
||||
|
||||
* ati_draw.c: - Pass the right pixel mask (all ones) in to
|
||||
PrepareSolid in the solid-fill-based composite acceleration. -
|
||||
Use a real pixmap when doing an UploadToScratch (For
|
||||
pDrawable->type == DRAWABLE_WINDOW, you need to get the backing
|
||||
pixmap). - Pass back the x/y offsets from kaaGetOffscreenPixmap
|
||||
unconditionally, because they'll be used in the scratch case. -
|
||||
Turn on the Render acceleration for Rage 128 and Radeon
|
||||
100-series at last!
|
||||
|
||||
2004-06-10 02:50 anholt
|
||||
|
||||
* ati_draw.c: Align scratch area offsets to the offscreen byte
|
||||
alignment.
|
||||
|
||||
2004-06-10 01:37 anholt
|
||||
|
||||
* ati_dma.c: Oops, testers reported that the last patch actually
|
||||
didn't work (conflicts occurred), so the R300 PDMA doesn't work.
|
||||
Disable.
|
||||
|
||||
2004-06-09 22:57 anholt
|
||||
|
||||
* ati_dma.c, ati_microcode.c: Bug #242: Fix setup of R300 cards, by
|
||||
providing R300 CP code from volodya-project and initializing
|
||||
PDMA.
|
||||
|
||||
2004-05-17 13:18 anholt
|
||||
|
||||
* Makefile.am, ati.c, ati.h, ati_cursor.c, ati_dma.c, ati_dma.h,
|
||||
ati_draw.c, ati_draw.h, ati_dri.c, ati_microcode.c, ati_reg.h,
|
||||
ati_video.c, r128_composite.c, radeon_composite.c: Overhaul of
|
||||
the ATI driver: - Add monochrome hardware cursor support. - Try
|
||||
to auto-detect AGP support for DRI on Radeons. And fail.
|
||||
Detect it properly on R128. - Set up card for pseudo-DMA if
|
||||
possible. Convert 2D rendering code to prepare DMA packets
|
||||
only. Use generic code to decode DMA packets to MMIO if PDMA
|
||||
is unavailable. Add WIP code to support "real" DMA without DRM
|
||||
support. - Dispatch pending DMA commands when the server sleeps.
|
||||
Otherwise some things, such as typing in an xterm, wouldn't
|
||||
show up for a time. - Fix Radeon Composite acceleration in
|
||||
many ways, and add Rage 128 Composite acceleration. Disable
|
||||
them both due to still-not-understood issues they have. They
|
||||
fail with In, Out, AtopReverse, and Xor, and text rendering is
|
||||
strange. - Add textured XV support for R100 and Rage 128. No
|
||||
brightness/sat controls, but it does support multiple ports,
|
||||
and cooperates with Composite. - Add WIP code for hostdata
|
||||
uploads. - Many cleanups and fixes.
|
||||
|
||||
2004-01-24 21:31 anholt
|
||||
|
||||
* ati_dri.c: Disable GLX visuals code on !GLXEXT, and remove a
|
||||
useless prototype.
|
||||
|
||||
2004-01-24 17:30 anholt
|
||||
|
||||
* ati.c, ati.h, ati_dri.c, radeon_composite.c: - Add glx visuals
|
||||
code based on XFree86's Radeon driver. - Reserve areas for
|
||||
back/depth/span when USING_DRI && GLXEXT. This would be better
|
||||
in a TransitionTo3d, but we'd need to work with the offscreen
|
||||
memory manager for that. - Misc. fixes to ati_dri.c for DRI+GLX.
|
||||
Needs more work still.
|
||||
|
||||
2004-01-24 17:16 anholt
|
||||
|
||||
* ati_draw.h: Oops, turn fallback output back off.
|
||||
|
||||
2004-01-24 17:04 anholt
|
||||
|
||||
* ati_dri.c: Whitespace cleanup.
|
||||
|
||||
2004-01-10 16:10 anholt
|
||||
|
||||
* ati_draw.c, r128_blendtmp.h: Support 1x1 repeat sources in R128's
|
||||
Blend.
|
||||
|
||||
2004-01-09 00:43 anholt
|
||||
|
||||
* ati.c, ati.h, ati_draw.c, ati_draw.h, ati_dri.c: Change PCI ID
|
||||
information field to be one of r128, r100, r200, r300. This is
|
||||
all the information we need so far. Put that information into
|
||||
atic, and use it correctly in the code (unlike before).
|
||||
|
||||
2004-01-08 12:18 anholt
|
||||
|
||||
* ati_draw.c, radeon_composite.c: Compile fixes for non-DRI case
|
||||
and for non-C99 compiler.
|
||||
|
||||
2004-01-08 00:25 anholt
|
||||
|
||||
* ati.c: Forced commit: Previous commit included the removal of the
|
||||
8192 scanline limit on offscreen memory in the fbdev case. I
|
||||
remember daenzer (who originally put that code in) saying he
|
||||
wasn't sure of it, and there doesn't seem to be any reason for
|
||||
that limit given how acceleration is done.
|
||||
|
||||
2004-01-08 00:16 anholt
|
||||
|
||||
* ati.c, ati.h, ati_draw.c: - Add a new UploadToScratch kaa hook
|
||||
for putting the data for a single pixmap into temporary
|
||||
offscreen storage. Subsequent UploadToScratch may clobber the
|
||||
data of previous ones. This allows hardware acceleration of
|
||||
composite operations on glyphs. - Add a new UploadToScreen kaa
|
||||
hook for doing the actual moving of data to framebuffer. This
|
||||
would allow us to do things like hostdata blits or memcpy to
|
||||
agp and then blit. - Add an UploadToScreen on ATI which is just
|
||||
memcpy, but which will be replaced with a hostdata blit soon.
|
||||
- Add UploadToScratch on ATI and reserve 64k of scratch space.
|
||||
This provided a 3x speedup of rgb24text on my Radeon.
|
||||
|
||||
2004-01-06 18:30 anholt
|
||||
|
||||
* radeon_composite.c: Speed things up slightly by removing Z values
|
||||
from emitted vertices and by emitting as a tri fan rather than a
|
||||
tri list. A rect list would save an additional vertex (out of 4)
|
||||
per rectangle, but there's no measurable speed difference and the
|
||||
tri fan may be useful when transforms come into play.
|
||||
|
||||
2004-01-04 12:47 anholt
|
||||
|
||||
* ati_draw.c, radeon_composite.c: - Correctly set the texture
|
||||
coordinate set source for the second texture unit. - Re-enable
|
||||
Radeon's Composite accel now that fonts work again.
|
||||
|
||||
2004-01-03 03:46 anholt
|
||||
|
||||
* ati_draw.c, radeon_composite.c: - Add more Composite operations,
|
||||
including Saturate, to Radeon Composite accel. I don't 100%
|
||||
trust that the math works for Saturate, but I can't tell from
|
||||
existing information. - Fix texture pitch fallback checks. -
|
||||
Fallback when src or mask have transforms. - Disable Radeon
|
||||
Composite accel until the offset thing is fixed. - Set
|
||||
offscreenPitch to 64 on Radeon thanks to new information and a
|
||||
kaa fix. Fixes acceleration at width!=1024.
|
||||
|
||||
2003-12-31 15:24 anholt
|
||||
|
||||
* radeon_composite.c: Some strange \240 character snuck into the
|
||||
original commit of this file.
|
||||
|
||||
2003-12-30 00:45 anholt
|
||||
|
||||
* ati_drawtmp.h: There's never a copy between different depths.
|
||||
Remove the check.
|
||||
|
||||
2003-12-30 00:23 anholt
|
||||
|
||||
* Makefile.am, ati_draw.c, ati_draw.h, ati_drawtmp.h, ati_reg.h,
|
||||
radeon_composite.c: - Add new Composite hook for kdrive drivers,
|
||||
which only ensures that the pixmaps are offscreen and don't
|
||||
have alpha maps. It is the last case checked before going to
|
||||
software fallback - Use the new Composite hook in the ati driver
|
||||
to implement acceleration of most Composites that get done in
|
||||
an xcompmgr environment on r100 series cards. It is only
|
||||
available when using the DRM. There are still some corruption
|
||||
issues, but the DRI is still non-default and I need to get this
|
||||
into version control.
|
||||
|
||||
2003-12-29 01:04 anholt
|
||||
|
||||
* Makefile.am: Add dependency lines so that servers are rebuilt
|
||||
when server libraries are changed.
|
||||
|
||||
2003-12-28 22:24 anholt
|
||||
|
||||
* Makefile.am, ati.c, ati.h, ati_draw.c, ati_draw.h, ati_drawtmp.h,
|
||||
ati_dri.c, ati_dri.h, ati_dripriv.h, ati_reg.h, ati_sarea.h,
|
||||
ati_stub.c, r128_blendtmp.h, r128_common.h, r128_sarea.h,
|
||||
radeon_common.h, radeon_sarea.h: Merge dri-0-1-branch to trunk.
|
||||
Notable changes: - Add libdrm and libdri. Portions of the DRI
|
||||
extension are stubbed out. - Use the DRM in the ATI driver
|
||||
when available. This provides a minor performance improvement
|
||||
in x11perf, and opens the possibility of using the 3d hardware
|
||||
for acceleration in the future. - Implement solid fill
|
||||
acceleration for Composite in KAA. - Implement Blend hook for
|
||||
Composite and use it on r128. - Fix a bug of mine that resulted
|
||||
in overuse of offscreen memory. - Fix many miscellaneous bugs in
|
||||
ATI driver and add PCI IDs.
|
||||
|
||||
2003-12-28 21:10 anholt
|
||||
|
||||
* ati_drawtmp.h, r128_blendtmp.h: - Disable libdrm verbosity. It
|
||||
isn't important enough yet to make a run-time flag for it. -
|
||||
Fix the (void)atic; tricks to quiet unused variable warnings in
|
||||
ATI template files. Mixing statements and variable defines works
|
||||
in newer compilers, but not pdx's.
|
||||
|
||||
2003-12-28 01:16 anholt
|
||||
|
||||
* ati.h, ati_draw.c, ati_draw.h, ati_drawtmp.h, ati_dri.c,
|
||||
r128_blendtmp.h: - Allow acceleration between same-depth pixmaps,
|
||||
rather than between anything and a dst that matched the screen
|
||||
depth (fixes corruption for non-screen-depth src and makes more
|
||||
acceleration possible). - Add ATI_FALLBACK macro and use it to
|
||||
allow verbose descriptions of why hardware acceleration fails.
|
||||
- Check that src and dst alignment meet requirements of the card
|
||||
before accelerating. The BIOS may set up screens that don't
|
||||
meet the requirements. - Fix the R128 offset alignment (32
|
||||
bytes, not 8). - Enable Blend operation even if screen is 24bpp
|
||||
(it will fail if the dest is 24bpp anyway).
|
||||
|
||||
2003-12-27 02:46 anholt
|
||||
|
||||
* ati_reg.h, r128_blendtmp.h: Properly initialize texture registers
|
||||
in Blend. Fixes problems with blending code such as whiteness in
|
||||
test-render, or no blending at all.
|
||||
|
||||
Tested by: andersca
|
||||
|
||||
2003-12-23 14:29 anholt
|
||||
|
||||
* Makefile.am, ati_draw.c, ati_drawtmp.h, ati_reg.h,
|
||||
r128_blendtmp.h: - Implement acceleration of Composite on R128
|
||||
when there is no mask, no transformation, no repeat, and only
|
||||
certain ops are used. - Add debugging output for software
|
||||
fallbacks for Composite. - Allow pixmaps in offscreen that don't
|
||||
match root depth. - Clean up some mess in ati_reg.h.
|
||||
|
||||
Many thanks to andersca for a lot of this code.
|
||||
|
||||
2003-12-09 21:01 anholt
|
||||
|
||||
* ati_draw.c: Add missing kaaDrawFini to ATI driver.
|
||||
|
||||
2003-12-01 14:56 anholt
|
||||
|
||||
* Makefile.am, ati.c, ati.h, ati_draw.c, ati_draw.h, ati_drawtmp.h,
|
||||
ati_dri.c, ati_dri.h, ati_dripriv.h, ati_reg.h, ati_sarea.h,
|
||||
ati_stub.c, r128_common.h, r128_sarea.h, radeon_common.h,
|
||||
radeon_sarea.h: - Initial add of enough of the DRI to create a 2d
|
||||
driver that uses the DRM for its acceleration. - Converted the
|
||||
ATI driver to use the DRM to execute rendering commands using
|
||||
DMA instead of MMIO when available.
|
||||
|
||||
2003-11-30 20:33 anholt
|
||||
|
||||
* Makefile.am, ati.c, ati.h, ati_stub.c: - Add fbdev mode-setting
|
||||
backend to Xati. It and vesa are compiled in when available,
|
||||
with fbdev being used by default. - Use depth 16 by default when
|
||||
vesa backend is used. - Add MMIO defines for PowerPC (should be
|
||||
in a common location).
|
||||
|
||||
Many thanks for Michel Daenzer for much of this code.
|
||||
|
||||
2003-11-30 19:15 anholt
|
||||
|
||||
* ati.c: Add more RV250 PCI IDs.
|
||||
|
||||
2003-11-30 17:46 anholt
|
||||
|
||||
* ati_draw.c: Remove sys/io.h inclusion from some files that didn't
|
||||
need it, and change asm/io.h to sys/io.h in vga.c, which newer
|
||||
Linux complains about.
|
||||
|
||||
2003-11-25 14:39 anholt
|
||||
|
||||
* ati.c: Add new Radeon 9200 PCI IDs.
|
||||
|
||||
2003-11-23 02:12 anholt
|
||||
|
||||
* ati_draw.c: - Fix Radeon offscreen pixmap pitch alignment. -
|
||||
Remove usleeps from idle and waitavail code, recommended by
|
||||
keithp. - Add a workaround for apparent broken acceleration with
|
||||
Rage 128 and offset alignment with 8-bit acceleration (24-hack
|
||||
and plain 8-bit). - Minor cleanup of setup code.
|
||||
|
||||
2003-11-22 18:08 anholt
|
||||
|
||||
* ati.c: Add RV250 PCI IDs.
|
||||
|
||||
2003-11-19 23:49 anholt
|
||||
|
||||
* ati.c, ati.h, ati_draw.c, ati_reg.h: - Fix a bug in pitch
|
||||
alignment for offscren pixmaps. - Add 24-bit acceleration for
|
||||
Xati using the 8-bit trick from mach64. - Add offscreen pixmap
|
||||
support to Xati.
|
||||
|
||||
2003-11-19 16:05 anholt
|
||||
|
||||
* ati.c, ati_draw.c: - Fix confusion of depth/bitsPerPixel in
|
||||
ati_draw.c - Disable acceleration with 24bpp due to apparent
|
||||
broken acceleration. Accel at 24bpp was the cause of the
|
||||
crashes when people tried to use any depth over 16. XFree86
|
||||
doesn't support 24 either. - Disable at < 8bpp, too. - Add the
|
||||
other Rage 128 PCI IDs. - Remove unnecessary setting of scissor
|
||||
registers (only default scissor gets used).
|
||||
|
||||
2003-11-19 00:32 anholt
|
||||
|
||||
* .cvsignore, Makefile.am, ati.c, ati.h, ati_draw.c, ati_reg.h,
|
||||
ati_stub.c: - Add PCI information (device/vendor id, bus
|
||||
location) to KdCardAttr to help with ati, and future DRM
|
||||
drivers. - Add new "ati" kdrive driver. It has ancestry in the
|
||||
r128 driver from andersca, but took a detour through being the
|
||||
WIP SiS 300 driver on the way. It supports Radeons (tested on
|
||||
QD VIVO and 7500) and Rage 128. Current limitations include
|
||||
that it requires depth 16 and that the other Rage 128 PCI IDs
|
||||
aren't included yet.
|
||||
|
|
@ -60,8 +60,7 @@ ATI_LIBS = \
|
|||
|
||||
Xati_LDADD = \
|
||||
$(ATI_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xati_DEPENDENCIES = \
|
||||
libati.a \
|
||||
|
|
|
@ -22,8 +22,7 @@ CHIPS_LIBS = \
|
|||
|
||||
Xchips_LDADD = \
|
||||
$(CHIPS_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xchips_DEPENDENCIES = \
|
||||
libchips.a \
|
||||
|
|
|
@ -520,6 +520,5 @@ exaDDXDriverInit(ScreenPtr pScreen)
|
|||
ExaScreenPriv(pScreen);
|
||||
|
||||
pExaScr->migration = ExaMigrationSmart;
|
||||
pExaScr->hideOffscreenPixmapData = TRUE;
|
||||
pExaScr->checkDirtyCorrectness = TRUE;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,7 @@ EPSON_LIBS = \
|
|||
|
||||
Xepson_LDADD = \
|
||||
$(EPSON_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xepson_DEPENDENCIES = \
|
||||
libepson.a \
|
||||
|
|
|
@ -16,8 +16,7 @@ Xfbdev_SOURCES = \
|
|||
|
||||
Xfbdev_LDADD = \
|
||||
libfbdev.a \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xfbdev_DEPENDENCIES = \
|
||||
libfbdev.a \
|
||||
|
|
|
@ -25,8 +25,7 @@ I810_LIBS = \
|
|||
|
||||
Xi810_LDADD = \
|
||||
$(I810_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xi810_DEPENDENCIES = \
|
||||
libi810.a \
|
||||
|
|
|
@ -1367,74 +1367,6 @@ igsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
|||
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
|
||||
igsDrawInit (ScreenPtr pScreen)
|
||||
|
@ -1453,9 +1385,7 @@ igsDrawInit (ScreenPtr pScreen)
|
|||
*/
|
||||
pScreen->CreateGC = igsCreateGC;
|
||||
pScreen->CopyWindow = igsCopyWindow;
|
||||
pScreen->PaintWindowBackground = igsPaintWindow;
|
||||
pScreen->PaintWindowBorder = igsPaintWindow;
|
||||
|
||||
|
||||
/*
|
||||
* Initialize patterns
|
||||
*/
|
||||
|
|
|
@ -29,8 +29,7 @@ MACH64_LIBS = \
|
|||
|
||||
Xmach64_LDADD = \
|
||||
$(MACH64_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xmach64_DEPENDENCIES = \
|
||||
libmach64.a \
|
||||
|
|
|
@ -24,8 +24,7 @@ MGA_LIBS = \
|
|||
|
||||
Xmga_LDADD = \
|
||||
$(MGA_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xmga_DEPENDENCIES = \
|
||||
libmga.a \
|
||||
|
|
|
@ -1,98 +0,0 @@
|
|||
2006-02-15 Keith Packard <keithp@keithp.com>
|
||||
|
||||
* Makefile.am:
|
||||
Add XSERVER_LIBS to build in xorg tree
|
||||
|
||||
2005-08-07 Keith Packard <keithp@keithp.com>
|
||||
|
||||
* neo_draw.c:
|
||||
Build with modular X libraries and headers
|
||||
|
||||
2005-06-09 Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* neo_draw.c:
|
||||
* neomagic.c: (neoScreenInit):
|
||||
Perform a warnings sweep on hw/kdrive. A number of these were my fault,
|
||||
but some come from others.
|
||||
|
||||
2005-06-09 Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* neo_draw.c: (neoWaitMarker), (neoDrawInit):
|
||||
* neomagic.c:
|
||||
* neomagic.h:
|
||||
- Replace the syncAccel hook in the kdrive structure with a pair of
|
||||
hooks in the kaa structure: markSync and waitMarker. The first, if
|
||||
set, returns a hardware-dependent marker number which can then be
|
||||
waited for with waitMarker. If markSync is absent (which is the case
|
||||
on all drivers currently), waitMarker must wait for idle on any given
|
||||
marker number. The intention is to allow for more parallelism when
|
||||
we get downloading from framebuffer, or more fine-grained idling.
|
||||
- Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and
|
||||
kaaWaitSync. These will need to be refined when KAA starts being
|
||||
smart about using them. Merge kpict.c into kasync.c since kasyn.c has
|
||||
all the rest of these fallback funcs.
|
||||
- Restructure all drivers to initialize a KaaInfo structure by hand
|
||||
rather than statically in dubious order.
|
||||
- Whack the i810 driver into shape in hopes that it'll work after this
|
||||
change (it certainly wouldn't have before this). Doesn't support my
|
||||
i845 though.
|
||||
- Make a new KXV helper to avoid duplicated code to fill the region
|
||||
with the necessary color key. Use it in i810 and mach64 (tested).
|
||||
|
||||
2005-02-08 Keith Packard <keithp@keithp.com>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
||||
* ChangeLog:
|
||||
* neomagicstub.c: (InitInput):
|
||||
|
||||
2005-02-08 Keith Packard <keithp@keithp.com>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
||||
* ChangeLog:
|
||||
* neomagicstub.c: (InitInput):
|
||||
|
||||
2005-02-08 Keith Packard <keithp@keithp.com>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
||||
* ChangeLog:
|
||||
* neomagicstub.c: (InitInput):
|
||||
|
||||
2005-02-08 Keith Packard <keithp@keithp.com>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
||||
* ChangeLog:
|
||||
* neomagicstub.c: (InitInput):
|
||||
|
||||
2005-02-08 Keith Packard <keithp@keithp.com>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
||||
* neomagicstub.c: (InitInput):
|
||||
|
||||
2004-07-21 Phil Blundell <pb@nexus.co.uk>
|
||||
|
||||
* Makefile.am (Xneomagic_LDADD): Include -lts if appropriate.
|
||||
Patch from pattieja@bentham.ispvip.biz.
|
||||
|
||||
2004-06-07 Franco Catrin L. <fcatrin@tuxpan.com>
|
||||
* Small fix for depth calculation
|
||||
|
||||
2004-04-11 Franco Catrin L. <fcatrin@tuxpan.com>
|
||||
|
||||
* Basic bitblt implementation
|
||||
* Fixed width and height calculation in solids
|
||||
* Added ROP (not tested)
|
||||
|
||||
2004-04-10 Franco Catrin L. <fcatrin@tuxpan.com>
|
||||
|
||||
* MMIO enabled after switching to new VT
|
||||
* First acceleration function implemented (DrawSolid)
|
||||
|
||||
2004-04-06 Franco Catrin L. <fcatrin@tuxpan.com>
|
||||
|
||||
* Returned to a working state. Brent will
|
||||
continue working on a backend in a separate CVS branch
|
|
@ -19,8 +19,6 @@ bin_PROGRAMS = Xneomagic
|
|||
noinst_LIBRARIES = libneomagic.a
|
||||
|
||||
libneomagic_a_SOURCES = \
|
||||
backend.h \
|
||||
backend.c \
|
||||
neomagic.c \
|
||||
neomagic.h \
|
||||
neo_draw.c
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
/*
|
||||
* Generic card driving functions.
|
||||
* Essentially, cascades calls to fbdev and vesa to initialize cards that
|
||||
* do not have hardware-specific routines yet. Copied from the ati driver.
|
||||
*
|
||||
* Copyright (c) 2004 Brent Cook <busterb@mail.utexas.edu>
|
||||
*
|
||||
* This code is licensed under the GPL. See the file COPYING in the root
|
||||
* directory of the sources for details.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <kdrive-config.h>
|
||||
#endif
|
||||
#include "backend.h"
|
||||
|
||||
Bool
|
||||
backendInitialize(KdCardInfo *card, BackendInfo *backend)
|
||||
{
|
||||
Bool success = FALSE;
|
||||
|
||||
#ifdef KDRIVEVESA
|
||||
if (!success && vesaInitialize(card, &backend->priv.vesa)) {
|
||||
success = TRUE;
|
||||
backend->type = VESA;
|
||||
backend->cardfini = vesaCardFini;
|
||||
backend->scrfini = vesaScreenFini;
|
||||
backend->initScreen = vesaInitScreen;
|
||||
backend->finishInitScreen = vesaFinishInitScreen;
|
||||
backend->createRes = vesaCreateResources;
|
||||
backend->preserve = vesaPreserve;
|
||||
backend->restore = vesaRestore;
|
||||
backend->dpms = vesaDPMS;
|
||||
backend->enable = vesaEnable;
|
||||
backend->disable = vesaDisable;
|
||||
backend->getColors = vesaGetColors;
|
||||
backend->putColors = vesaPutColors;
|
||||
}
|
||||
#endif
|
||||
#ifdef KDRIVEFBDEV
|
||||
if (!success && fbdevInitialize(card, &backend->priv.fbdev)) {
|
||||
success = TRUE;
|
||||
backend->type = FBDEV;
|
||||
backend->cardfini = fbdevCardFini;
|
||||
backend->scrfini = fbdevScreenFini;
|
||||
backend->initScreen = fbdevInitScreen;
|
||||
backend->finishInitScreen = fbdevFinishInitScreen;
|
||||
backend->createRes = fbdevCreateResources;
|
||||
backend->preserve = fbdevPreserve;
|
||||
backend->restore = fbdevRestore;
|
||||
backend->dpms = fbdevDPMS;
|
||||
backend->enable = fbdevEnable;
|
||||
backend->disable = fbdevDisable;
|
||||
backend->getColors = fbdevGetColors;
|
||||
backend->putColors = fbdevPutColors;
|
||||
}
|
||||
#endif
|
||||
return success;
|
||||
}
|
||||
|
||||
Bool
|
||||
backendScreenInitialize(KdScreenInfo *screen, BackendScreen *backendScreen,
|
||||
BackendInfo *backendCard)
|
||||
{
|
||||
Bool success = FALSE;
|
||||
|
||||
#ifdef KDRIVEFBDEV
|
||||
if (backendCard->type == FBDEV) {
|
||||
screen->card->driver = &backendCard->priv.fbdev;
|
||||
success = fbdevScreenInitialize(screen, &backendScreen->fbdev);
|
||||
screen->memory_size = backendCard->priv.fbdev.fix.smem_len;
|
||||
screen->off_screen_base = backendCard->priv.fbdev.var.yres_virtual
|
||||
* screen->fb[0].byteStride;
|
||||
}
|
||||
#endif
|
||||
#ifdef KDRIVEVESA
|
||||
if (backendCard->type == VESA) {
|
||||
screen->card->driver = &backendCard->priv.vesa;
|
||||
if (screen->fb[0].depth == 0) {
|
||||
screen->fb[0].depth = 16;
|
||||
}
|
||||
success = vesaScreenInitialize(screen, &backendScreen->vesa);
|
||||
}
|
||||
#endif
|
||||
return success;
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* Generic card driving functions.
|
||||
* Essentially, cascades calls to fbdev and vesa to initialize cards that
|
||||
* do not have hardware-specific routines yet. Copied from the ati driver.
|
||||
*
|
||||
* Copyright (c) 2004 Brent Cook <busterb@mail.utexas.edu>
|
||||
*
|
||||
* This code is licensed under the GPL. See the file COPYING in the root
|
||||
* directory of the sources for details.
|
||||
*/
|
||||
|
||||
#ifndef _BACKEND_H_
|
||||
#define _BACKEND_H_
|
||||
#include "kdrive.h"
|
||||
|
||||
#ifdef KDRIVEFBDEV
|
||||
#include <fbdev.h>
|
||||
#endif
|
||||
#ifdef KDRIVEVESA
|
||||
#include <vesa.h>
|
||||
#endif
|
||||
|
||||
typedef enum _BackendType {VESA, FBDEV} BackendType;
|
||||
|
||||
typedef struct _BackendInfo {
|
||||
// backend info
|
||||
BackendType type;
|
||||
|
||||
// backend internal structures
|
||||
union {
|
||||
#ifdef KDRIVEFBDEV
|
||||
FbdevPriv fbdev;
|
||||
#endif
|
||||
#ifdef KDRIVEVESA
|
||||
VesaCardPrivRec vesa;
|
||||
#endif
|
||||
} priv;
|
||||
|
||||
// pointers to helper functions for this backend
|
||||
void (*cardfini)(KdCardInfo *);
|
||||
void (*scrfini)(KdScreenInfo *);
|
||||
Bool (*initScreen)(ScreenPtr);
|
||||
Bool (*finishInitScreen)(ScreenPtr pScreen);
|
||||
Bool (*createRes)(ScreenPtr);
|
||||
void (*preserve)(KdCardInfo *);
|
||||
void (*restore)(KdCardInfo *);
|
||||
Bool (*dpms)(ScreenPtr, int);
|
||||
Bool (*enable)(ScreenPtr);
|
||||
void (*disable)(ScreenPtr);
|
||||
void (*getColors)(ScreenPtr, int, int, xColorItem *);
|
||||
void (*putColors)(ScreenPtr, int, int, xColorItem *);
|
||||
} BackendInfo;
|
||||
|
||||
typedef union _BackendScreen {
|
||||
#ifdef KDRIVEFBDEV
|
||||
FbdevScrPriv fbdev;
|
||||
#endif
|
||||
#ifdef KDRIVEVESA
|
||||
VesaScreenPrivRec vesa;
|
||||
#endif
|
||||
} BackendScreen;
|
||||
|
||||
Bool
|
||||
backendInitialize(KdCardInfo *card, BackendInfo *backend);
|
||||
|
||||
Bool
|
||||
backendScreenInitialize(KdScreenInfo *screen, BackendScreen *backendScreen,
|
||||
BackendInfo *backendCard);
|
||||
|
||||
#endif
|
|
@ -25,8 +25,7 @@ NVIDIA_LIBS = \
|
|||
|
||||
Xnvidia_LDADD = \
|
||||
$(NVIDIA_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xnvidia_DEPENDENCIES = \
|
||||
libnvidia.a \
|
||||
|
|
|
@ -23,8 +23,7 @@ PM2_LIBS = \
|
|||
|
||||
Xpm2_LDADD = \
|
||||
$(PM2_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xpm2_DEPENDENCIES = \
|
||||
libpm2.a \
|
||||
|
|
|
@ -22,8 +22,7 @@ R128_LIBS = \
|
|||
|
||||
Xr128_LDADD = \
|
||||
$(R128_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xr128_DEPENDENCIES = \
|
||||
libr128.a \
|
||||
|
|
|
@ -470,7 +470,6 @@ void s3CursorDisable (ScreenPtr pScreen);
|
|||
void s3CursorFini (ScreenPtr pScreen);
|
||||
void s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdefs);
|
||||
|
||||
void s3DumbPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
void s3DumbCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
Bool s3DrawInit (ScreenPtr pScreen);
|
||||
|
|
|
@ -2260,71 +2260,6 @@ s3PaintKey (DrawablePtr pDrawable,
|
|||
}
|
||||
#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
|
||||
s3CopyWindowProc (DrawablePtr pSrcDrawable,
|
||||
DrawablePtr pDstDrawable,
|
||||
|
@ -3005,55 +2940,6 @@ s3_24CreateWindow(WindowPtr 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
|
||||
s3DrawInit (ScreenPtr pScreen)
|
||||
|
@ -3088,8 +2974,6 @@ s3DrawInit (ScreenPtr pScreen)
|
|||
{
|
||||
pScreen->CreateGC = s3_24CreateGC;
|
||||
pScreen->CreateWindow = s3_24CreateWindow;
|
||||
pScreen->PaintWindowBackground = s3_24PaintWindow;
|
||||
pScreen->PaintWindowBorder = s3_24PaintWindow;
|
||||
pScreen->CopyWindow = s3CopyWindow;
|
||||
}
|
||||
else
|
||||
|
@ -3100,8 +2984,6 @@ s3DrawInit (ScreenPtr pScreen)
|
|||
pScreen->CreateWindow = s3CreateWindow;
|
||||
pScreen->ChangeWindowAttributes = s3ChangeWindowAttributes;
|
||||
pScreen->DestroyWindow = s3DestroyWindow;
|
||||
pScreen->PaintWindowBackground = s3PaintWindow;
|
||||
pScreen->PaintWindowBorder = s3PaintWindow;
|
||||
#ifndef S3_TRIO
|
||||
if (pScreenPriv->screen->fb[1].depth)
|
||||
{
|
||||
|
|
|
@ -7,9 +7,8 @@ bin_PROGRAMS = Xsdl
|
|||
|
||||
Xsdl_SOURCES = sdl.c
|
||||
|
||||
Xsdl_LDADD = @KDRIVE_PURE_LIBS@ \
|
||||
Xsdl_LDADD = \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
@XSDL_LIBS@
|
||||
|
||||
Xsdl_DEPENDENCIES = @KDRIVE_LOCAL_LIBS@
|
||||
|
|
|
@ -1537,75 +1537,6 @@ sisCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
|||
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
|
||||
sisDrawInit (ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -1621,9 +1552,7 @@ sisDrawInit (ScreenPtr pScreen)
|
|||
*/
|
||||
pScreen->CreateGC = sisCreateGC;
|
||||
pScreen->CopyWindow = sisCopyWindow;
|
||||
pScreen->PaintWindowBackground = sisPaintWindow;
|
||||
pScreen->PaintWindowBorder = sisPaintWindow;
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,8 +27,7 @@ SMI_LIBS = \
|
|||
|
||||
Xsmi_LDADD = \
|
||||
$(SMI_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xsmi_DEPENDENCIES = \
|
||||
libsmi.a \
|
||||
|
|
|
@ -1008,52 +1008,6 @@ kaaFillRegionTiled (DrawablePtr pDrawable,
|
|||
}
|
||||
#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
|
||||
kaaDrawInit (ScreenPtr pScreen,
|
||||
KaaScreenInfoPtr pScreenInfo)
|
||||
|
@ -1083,8 +1037,6 @@ kaaDrawInit (ScreenPtr pScreen,
|
|||
*/
|
||||
pScreen->CreateGC = kaaCreateGC;
|
||||
pScreen->CopyWindow = kaaCopyWindow;
|
||||
pScreen->PaintWindowBackground = kaaPaintWindow;
|
||||
pScreen->PaintWindowBorder = kaaPaintWindow;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
ps->Composite = kaaComposite;
|
||||
|
|
|
@ -223,14 +223,6 @@ KdCheckGetSpans (DrawablePtr pDrawable,
|
|||
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
|
||||
KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
|
@ -265,8 +257,6 @@ KdScreenInitAsync (ScreenPtr pScreen)
|
|||
{
|
||||
pScreen->GetImage = KdCheckGetImage;
|
||||
pScreen->GetSpans = KdCheckGetSpans;
|
||||
pScreen->PaintWindowBackground = KdCheckPaintWindow;
|
||||
pScreen->PaintWindowBorder = KdCheckPaintWindow;
|
||||
pScreen->CopyWindow = KdCheckCopyWindow;
|
||||
#ifdef RENDER
|
||||
KdPictureInitAsync (pScreen);
|
||||
|
|
|
@ -611,9 +611,6 @@ KdCheckGetSpans (DrawablePtr pDrawable,
|
|||
int nspans,
|
||||
char *pdstStart);
|
||||
|
||||
void
|
||||
KdCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
void
|
||||
KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@ Xvesa_SOURCES = \
|
|||
|
||||
Xvesa_LDADD = \
|
||||
libvesa.a \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xvesa_DEPENDENCIES = \
|
||||
libvesa.a \
|
||||
|
|
|
@ -23,8 +23,7 @@ VIA_LIBS = \
|
|||
|
||||
Xvia_LDADD = \
|
||||
$(VIA_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xvia_DEPENDENCIES = \
|
||||
libvia.a \
|
||||
|
|
|
@ -19,12 +19,13 @@ libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c
|
|||
|
||||
Xvfb_SOURCES = $(SRCS)
|
||||
|
||||
Xvfb_LDADD = $(XORG_CORE_LIBS) \
|
||||
$(XVFB_LIBS) \
|
||||
$(XSERVER_LIBS) \
|
||||
$(EXTENSION_LIBS) \
|
||||
$(XVFBMODULES_LIBS) \
|
||||
libfbcmap.a
|
||||
XVFB_LIBS = \
|
||||
@XVFB_LIBS@ \
|
||||
libfbcmap.a \
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS)
|
||||
Xvfb_DEPENDENCIES = $(XVFB_LIBS)
|
||||
|
||||
# Man page
|
||||
include $(top_srcdir)/cpprules.in
|
||||
|
|
|
@ -48,7 +48,7 @@ osandcommon.c xorg.c:
|
|||
DISTCLEANFILES = osandcommon.c xorg.c
|
||||
|
||||
XORG_LIBS = \
|
||||
@XORG_CORE_LIBS@ \
|
||||
$(XSERVER_LIBS) \
|
||||
common/libinit.a \
|
||||
loader/libloader.a \
|
||||
libosandcommon.la \
|
||||
|
@ -59,14 +59,14 @@ XORG_LIBS = \
|
|||
ramdac/libramdac.a \
|
||||
ddc/libddc.a \
|
||||
i2c/libi2c.a \
|
||||
@XORG_LIBS@
|
||||
dixmods/libxorgxkb.la \
|
||||
$(top_builddir)/mi/libmi.la \
|
||||
$(top_builddir)/os/libos.la \
|
||||
@XORG_LIBS@ \
|
||||
dixmods/libxorgxkb.la
|
||||
|
||||
Xorg_DEPENDENCIES = \
|
||||
$(XORG_LIBS)
|
||||
|
||||
Xorg_LDADD = $(XORG_LIBS) \
|
||||
@XSERVER_LIBS@ \
|
||||
dixmods/libxorgxkb.la
|
||||
Xorg_DEPENDENCIES = $(XORG_LIBS)
|
||||
Xorg_LDADD = $(XORG_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
|
||||
|
||||
Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
#define KanaMask Mod4Mask
|
||||
#define ScrollLockMask Mod5Mask
|
||||
|
||||
#define KeyPressed(k) (keyc->down[k >> 3] & (1 << (k & 7)))
|
||||
#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
|
||||
#define ModifierDown(k) ((keyc->state & (k)) == (k))
|
||||
|
||||
/*
|
||||
|
|
|
@ -138,12 +138,6 @@ Bool xf86IsEntityPrimary(int entityIndex);
|
|||
resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes);
|
||||
resPtr xf86SetOperatingState(resList list, int entityIndex, int mask);
|
||||
void xf86EnterServerState(xf86State state);
|
||||
resRange xf86GetBlock(unsigned long type, memType size,
|
||||
memType window_start, memType window_end,
|
||||
memType align_mask, resPtr avoid);
|
||||
resRange xf86GetSparse(unsigned long type, memType fixed_bits,
|
||||
memType decode_mask, memType address_mask,
|
||||
resPtr avoid);
|
||||
memType xf86ChkConflict(resRange *rgp, int entityIndex);
|
||||
ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
|
||||
Bool xf86NoSharedResources(int screenIndex, resType res);
|
||||
|
|
|
@ -77,9 +77,6 @@ static resPtr AccReducers = NULL;
|
|||
resPtr Acc = NULL;
|
||||
resPtr osRes = NULL;
|
||||
|
||||
/* allocatable ranges */
|
||||
resPtr ResRange = NULL;
|
||||
|
||||
/* predefined special resources */
|
||||
_X_EXPORT resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END};
|
||||
_X_EXPORT resRange resVgaShared[] = {_VGA_SHARED, _END};
|
||||
|
@ -1366,11 +1363,6 @@ xf86ResourceBrokerInit(void)
|
|||
|
||||
osRes = NULL;
|
||||
|
||||
/* Get the addressable ranges */
|
||||
ResRange = xf86BusAccWindowsFromOS();
|
||||
xf86MsgVerb(X_INFO, 3, "Addressable bus resource ranges are\n");
|
||||
xf86PrintResList(3, ResRange);
|
||||
|
||||
/* Get the ranges used exclusively by the system */
|
||||
osRes = xf86AccResFromOS(osRes);
|
||||
xf86MsgVerb(X_INFO, 3, "OS-reported resource ranges:\n");
|
||||
|
@ -1548,213 +1540,6 @@ RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, Bool useEstimated
|
|||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Resource request code
|
||||
*/
|
||||
|
||||
#define ALIGN(x,a) ((x) + a) &~(a)
|
||||
|
||||
_X_EXPORT resRange
|
||||
xf86GetBlock(unsigned long type, memType size,
|
||||
memType window_start, memType window_end,
|
||||
memType align_mask, resPtr avoid)
|
||||
{
|
||||
memType min, max, tmp;
|
||||
resRange r = {ResEnd,0,0};
|
||||
resPtr res_range = ResRange;
|
||||
|
||||
if (!size) return r;
|
||||
if (window_end < window_start || (window_end - window_start) < (size - 1)) {
|
||||
ErrorF("Requesting insufficient memory window!:"
|
||||
" start: 0x%lx end: 0x%lx size 0x%lx\n",
|
||||
window_start,window_end,size);
|
||||
return r;
|
||||
}
|
||||
type = (type & ~(ResExtMask | ResBios | ResEstimated)) | ResBlock;
|
||||
|
||||
while (res_range) {
|
||||
if ((type & ResTypeMask) == (res_range->res_type & ResTypeMask)) {
|
||||
if (res_range->block_begin > window_start)
|
||||
min = res_range->block_begin;
|
||||
else
|
||||
min = window_start;
|
||||
if (res_range->block_end < window_end)
|
||||
max = res_range->block_end;
|
||||
else
|
||||
max = window_end;
|
||||
min = ALIGN(min,align_mask);
|
||||
/* do not produce an overflow! */
|
||||
while (min < max && (max - min) >= (size - 1)) {
|
||||
RANGE(r,min,min + size - 1,type);
|
||||
tmp = ChkConflict(&r,Acc,SETUP);
|
||||
if (!tmp) {
|
||||
tmp = ChkConflict(&r,avoid,SETUP);
|
||||
if (!tmp) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
min = ALIGN(tmp,align_mask);
|
||||
}
|
||||
}
|
||||
res_range = res_range->next;
|
||||
}
|
||||
RANGE(r,0,0,ResEnd);
|
||||
return r;
|
||||
}
|
||||
|
||||
#define mt_max ~(memType)0
|
||||
#define length sizeof(memType) * 8
|
||||
/*
|
||||
* make_base() -- assign the lowest bits to the bits set in mask.
|
||||
* example: mask 011010 val 0000110 -> 011000
|
||||
*/
|
||||
static memType
|
||||
make_base(memType val, memType mask)
|
||||
{
|
||||
int i,j = 0;
|
||||
memType ret = 0
|
||||
;
|
||||
for (i = 0;i<length;i++) {
|
||||
if ((1 << i) & mask) {
|
||||
ret |= (((val >> j) & 1) << i);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* make_base() -- assign the bits set in mask to the lowest bits.
|
||||
* example: mask 011010 , val 010010 -> 000011
|
||||
*/
|
||||
static memType
|
||||
unmake_base(memType val, memType mask)
|
||||
{
|
||||
int i,j = 0;
|
||||
memType ret = 0;
|
||||
|
||||
for (i = 0;i<length;i++) {
|
||||
if ((1 << i) & mask) {
|
||||
ret |= (((val >> i) & 1) << j);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static memType
|
||||
fix_counter(memType val, memType old_mask, memType mask)
|
||||
{
|
||||
mask = old_mask & mask;
|
||||
|
||||
val = make_base(val,old_mask);
|
||||
return unmake_base(val,mask);
|
||||
}
|
||||
|
||||
_X_EXPORT resRange
|
||||
xf86GetSparse(unsigned long type, memType fixed_bits,
|
||||
memType decode_mask, memType address_mask, resPtr avoid)
|
||||
{
|
||||
resRange r = {ResEnd,0,0};
|
||||
memType new_mask;
|
||||
memType mask1;
|
||||
memType base;
|
||||
memType counter = 0;
|
||||
memType counter1;
|
||||
memType max_counter = ~(memType)0;
|
||||
memType max_counter1;
|
||||
memType conflict = 0;
|
||||
|
||||
/* for sanity */
|
||||
type = (type & ~(ResExtMask | ResBios | ResEstimated)) | ResSparse;
|
||||
|
||||
/*
|
||||
* a sparse address consists of 3 parts:
|
||||
* fixed_bits: F bits which hard decoded by the hardware
|
||||
* decode_bits: D bits which are used to decode address
|
||||
* but which may be set by software
|
||||
* address_bits: A bits which are used to address the
|
||||
* sparse range.
|
||||
* the decode_mask marks all decode bits while the address_mask
|
||||
* masks out all address_bits:
|
||||
* F D A
|
||||
* decode_mask: 0 1 0
|
||||
* address_mask: 1 1 0
|
||||
*/
|
||||
decode_mask &= address_mask;
|
||||
new_mask = decode_mask;
|
||||
|
||||
/*
|
||||
* We start by setting the decode_mask bits to different values
|
||||
* when a conflict is found the address_mask of the conflicting
|
||||
* resource is returned. We remove those bits from decode_mask
|
||||
* that are also set in the returned address_mask as they always
|
||||
* conflict with resources which use them as address masks.
|
||||
* The resoulting mask is stored in new_mask.
|
||||
* We continue until no conflict is found or until we have
|
||||
* tried all possible settings of new_mask.
|
||||
*/
|
||||
while (1) {
|
||||
base = make_base(counter,new_mask) | fixed_bits;
|
||||
RANGE(r,base,address_mask,type);
|
||||
conflict = ChkConflict(&r,Acc,SETUP);
|
||||
if (!conflict) {
|
||||
conflict = ChkConflict(&r,avoid,SETUP);
|
||||
if (!conflict) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
counter = fix_counter(counter,new_mask,conflict);
|
||||
max_counter = fix_counter(max_counter,new_mask,conflict);
|
||||
new_mask &= conflict;
|
||||
counter ++;
|
||||
if (counter > max_counter) break;
|
||||
}
|
||||
if (!new_mask && (new_mask == decode_mask)) {
|
||||
RANGE(r,0,0,ResEnd);
|
||||
return r;
|
||||
}
|
||||
/*
|
||||
* if we haven't been successful we also try to modify those
|
||||
* bits in decode_mask that are not at the same time set in
|
||||
* new mask. These bits overlap with address_bits of some
|
||||
* resources. If a conflict with a resource of this kind is
|
||||
* found (ie. returned_mask & mask1 != mask1) with
|
||||
* mask1 = decode_mask & ~new_mask we cannot
|
||||
* use our choice of bits in the new_mask part. We try
|
||||
* another choice.
|
||||
*/
|
||||
max_counter = fix_counter(mt_max,mt_max,new_mask);
|
||||
mask1 = decode_mask & ~new_mask;
|
||||
max_counter1 = fix_counter(mt_max,mt_max,mask1);
|
||||
counter = 0;
|
||||
|
||||
while (1) {
|
||||
counter1 = 0;
|
||||
while (1) {
|
||||
base = make_base(counter1,mask1);
|
||||
RANGE(r,base,address_mask,type);
|
||||
conflict = ChkConflict(&r,Acc,SETUP);
|
||||
if (!conflict) {
|
||||
conflict = ChkConflict(&r,avoid,SETUP);
|
||||
if (!conflict) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
counter1 ++;
|
||||
if ((mask1 & conflict) != mask1 || counter1 > max_counter1)
|
||||
break;
|
||||
}
|
||||
counter ++;
|
||||
if (counter > max_counter) break;
|
||||
}
|
||||
RANGE(r,0,0,ResEnd);
|
||||
return r;
|
||||
}
|
||||
|
||||
#undef length
|
||||
#undef mt_max
|
||||
|
||||
/*
|
||||
* Resource registrarion
|
||||
*/
|
||||
|
|
|
@ -811,9 +811,11 @@ xf86ReleaseKeys(DeviceIntPtr pDev)
|
|||
(*pDev->public.processInputProc) (&ke, pDev, 1);
|
||||
}
|
||||
else {
|
||||
int sigstate = xf86BlockSIGIO ();
|
||||
nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i);
|
||||
for (j = 0; j < nevents; j++)
|
||||
EqEnqueue(pDev, xf86Events + i);
|
||||
mieqEnqueue(pDev, xf86Events + j);
|
||||
xf86UnblockSIGIO(sigstate);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1813,7 +1813,7 @@ xf86PrintBanner()
|
|||
"latest version in the X.Org Foundation git repository.\n"
|
||||
"See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
|
||||
#endif
|
||||
ErrorF("\nX Window System Version %d.%d.%d",
|
||||
ErrorF("\nX.Org X Server %d.%d.%d",
|
||||
XORG_VERSION_MAJOR,
|
||||
XORG_VERSION_MINOR,
|
||||
XORG_VERSION_PATCH);
|
||||
|
@ -1847,8 +1847,8 @@ xf86PrintBanner()
|
|||
#define XORG_DATE XF86_DATE
|
||||
#endif
|
||||
ErrorF("\nRelease Date: %s\n", XORG_DATE);
|
||||
ErrorF("X Protocol Version %d, Revision %d, %s\n",
|
||||
X_PROTOCOL, X_PROTOCOL_REVISION, XORG_RELEASE );
|
||||
ErrorF("X Protocol Version %d, Revision %d\n",
|
||||
X_PROTOCOL, X_PROTOCOL_REVISION);
|
||||
ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR);
|
||||
#ifdef HAS_UTSNAME
|
||||
{
|
||||
|
|
|
@ -133,7 +133,5 @@ extern resRange res8514Shared[];
|
|||
{ResExcIoSparse | ResBus, 0x0200, 0x0200},\
|
||||
{ResExcMemBlock | ResBus, 0xA0000,0xFFFFF}
|
||||
|
||||
extern resRange PciAvoid[];
|
||||
|
||||
#define RES_UNDEFINED NULL
|
||||
#endif
|
||||
|
|
|
@ -293,15 +293,50 @@ server searches for font databases.
|
|||
Multiple
|
||||
.B FontPath
|
||||
entries may be specified, and they will be concatenated to build up the
|
||||
fontpath used by the server. Font path elements may be either absolute
|
||||
directory paths, or a font server identifier.
|
||||
Font server identifiers have the form:
|
||||
fontpath used by the server. Font path elements can be absolute
|
||||
directory paths, catalogue directories or a font server identifier. The
|
||||
formats of the later two are explained below:
|
||||
.PP
|
||||
.RS 7
|
||||
Catalogue directories:
|
||||
.PP
|
||||
.RS 4
|
||||
Catalogue directories can be specified using the prefix \fBcatalogue:\fR
|
||||
before the directory name. The directory can then be populated with
|
||||
symlinks pointing to the real font directories, using the following
|
||||
syntax in the symlink name:
|
||||
.PP
|
||||
.RS 4
|
||||
.IR <identifier> : [attribute]: pri= <priority>
|
||||
.RE
|
||||
.PP
|
||||
where
|
||||
.I <identifier>
|
||||
is an alphanumeric identifier,
|
||||
.I [attribute]
|
||||
is an attribute wich will be passed to the underlying FPE and
|
||||
.I <priority>
|
||||
is a number used to order the fontfile FPEs. Examples:
|
||||
.PP
|
||||
.RS 4
|
||||
.nf
|
||||
.I 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi
|
||||
.I gscript:pri=60 -> /usr/share/fonts/default/ghostscript
|
||||
.I misc:unscaled:pri=10 \-> /usr/share/X11/fonts/misc
|
||||
.fi
|
||||
.PP
|
||||
.RE .RE .RE
|
||||
.PP
|
||||
.RS 7
|
||||
Font server identifiers:
|
||||
.PP
|
||||
.RS 4
|
||||
Font server identifiers have the form:
|
||||
.RS 4
|
||||
.PP
|
||||
.RS 11
|
||||
.IR <trans> / <hostname> : <port\-number>
|
||||
.RE
|
||||
.PP
|
||||
.RS 7
|
||||
where
|
||||
.I <trans>
|
||||
is the transport type to use to connect to the font server (e.g.,
|
||||
|
@ -313,10 +348,11 @@ for a TCP/IP connection),
|
|||
is the hostname of the machine running the font server, and
|
||||
.I <port\-number>
|
||||
is the port number that the font server is listening on (usually 7100).
|
||||
.RE
|
||||
.PP
|
||||
When this entry is not specified in the config file, the server falls back
|
||||
to the compiled\-in default font path, which contains the following
|
||||
font path elements:
|
||||
font path elements (which can be set inside a catalogue directory):
|
||||
.PP
|
||||
.RS 4
|
||||
.nf
|
||||
|
|
|
@ -37,4 +37,4 @@ default is intended to be the best performing one for general use, though others
|
|||
may help with specific use cases. Available options include \*qalways\*q,
|
||||
\*qgreedy\*q, and \*qsmart\*q. Default: always.
|
||||
.SH AUTHORS
|
||||
Authors include: Keith Packard, Eric Anholt, Zack Rusin, and Michel Dänzer
|
||||
Authors include: Keith Packard, Eric Anholt, Zack Rusin, and Michel D\(:anzer
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user