Wrap ClipNotify to see region motions during MoveWindow.
Check window reorigin in PositionWindow and bump pixmap serial numbers to revalidate GCs. Fix picture clip region origin in automatic update Initialize client private 'critical' value Clean up pixmap bounds checking code to only affect contents allocated by fb. Oops. Call SourceValidate for Composite operations. Add Xchips server (vesa based)
This commit is contained in:
parent
6db7792540
commit
33fdd50a94
|
@ -1,5 +1,5 @@
|
||||||
if KDRIVEVESA
|
if KDRIVEVESA
|
||||||
VESA_SUBDIRS = vesa mach64 mga nvidia r128 smi
|
VESA_SUBDIRS = vesa mach64 mga nvidia r128 smi chips
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if KDRIVEFBDEV
|
if KDRIVEFBDEV
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $
|
|
||||||
XCOMM $RCSId: xc/programs/Xserver/hw/kdrive/chips/Imakefile,v 1.6 2000/10/20 00:19:51 keithp Exp $
|
|
||||||
KDRIVE=..
|
|
||||||
#include "../Kdrive.tmpl"
|
|
||||||
|
|
||||||
SRCS = chips.c chipsdraw.c chipsstub.c
|
|
||||||
|
|
||||||
OBJS = chips.o chipsdraw.o chipsstub.o
|
|
||||||
|
|
||||||
INCLUDES = -I. $(KDINCS) -I$(KDRIVE)/vesa
|
|
||||||
|
|
||||||
NormalLibraryObjectRule()
|
|
||||||
NormalLibraryTarget(chips,$(OBJS))
|
|
||||||
DependTarget()
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
INCLUDES = \
|
||||||
|
@KDRIVE_INCS@ \
|
||||||
|
-I$(top_srcdir)/hw/kdrive/vesa \
|
||||||
|
@XSERVER_CFLAGS@
|
||||||
|
|
||||||
|
bin_PROGRAMS = Xchips
|
||||||
|
|
||||||
|
if TSLIB
|
||||||
|
TSLIB_FLAG = -lts
|
||||||
|
endif
|
||||||
|
|
||||||
|
noinst_LIBRARIES = libchips.a
|
||||||
|
|
||||||
|
libchips_a_SOURCES = \
|
||||||
|
chipsdraw.c \
|
||||||
|
chips.c \
|
||||||
|
chips.h
|
||||||
|
|
||||||
|
Xchips_SOURCES = \
|
||||||
|
chipsstub.c
|
||||||
|
|
||||||
|
Xchips_LDADD = \
|
||||||
|
libchips.a \
|
||||||
|
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
|
||||||
|
@KDRIVE_LIBS@ \
|
||||||
|
@XSERVER_LIBS@ \
|
||||||
|
$(TSLIB_FLAG)
|
||||||
|
|
|
@ -131,10 +131,45 @@ chipsInitScreen (ScreenPtr pScreen)
|
||||||
return vesaInitScreen (pScreen);
|
return vesaInitScreen (pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RANDR
|
||||||
|
static Bool
|
||||||
|
chipsRandRSetConfig (ScreenPtr pScreen,
|
||||||
|
Rotation rotation,
|
||||||
|
int rate,
|
||||||
|
RRScreenSizePtr pSize)
|
||||||
|
{
|
||||||
|
KdCheckSync (pScreen);
|
||||||
|
|
||||||
|
if (!vesaRandRSetConfig (pScreen, rotation, rate, pSize))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
chipsRandRInit (ScreenPtr pScreen)
|
||||||
|
{
|
||||||
|
rrScrPriv(pScreen);
|
||||||
|
|
||||||
|
pScrPriv->rrSetConfig = chipsRandRSetConfig;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
chipsFinishInitScreen (ScreenPtr pScreen)
|
chipsFinishInitScreen (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
return vesaFinishInitScreen (pScreen);
|
Bool ret;
|
||||||
|
ret = vesaFinishInitScreen (pScreen);
|
||||||
|
#ifdef RANDR
|
||||||
|
chipsRandRInit (pScreen);
|
||||||
|
#endif
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
chipsCreateResources (ScreenPtr pScreen)
|
||||||
|
{
|
||||||
|
return vesaCreateResources (pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
CARD8
|
CARD8
|
||||||
|
@ -279,6 +314,8 @@ KdCardFuncs chipsFuncs = {
|
||||||
chipsCardInit, /* cardinit */
|
chipsCardInit, /* cardinit */
|
||||||
chipsScreenInit, /* scrinit */
|
chipsScreenInit, /* scrinit */
|
||||||
chipsInitScreen, /* initScreen */
|
chipsInitScreen, /* initScreen */
|
||||||
|
chipsFinishInitScreen, /* finishInitScreen */
|
||||||
|
chipsCreateResources, /* createRes */
|
||||||
chipsPreserve, /* preserve */
|
chipsPreserve, /* preserve */
|
||||||
chipsEnable, /* enable */
|
chipsEnable, /* enable */
|
||||||
vesaDPMS, /* dpms */
|
vesaDPMS, /* dpms */
|
||||||
|
@ -301,5 +338,4 @@ KdCardFuncs chipsFuncs = {
|
||||||
|
|
||||||
vesaGetColors, /* getColors */
|
vesaGetColors, /* getColors */
|
||||||
vesaPutColors, /* putColors */
|
vesaPutColors, /* putColors */
|
||||||
chipsFinishInitScreen /* finishInitScreen */
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "chips.h"
|
#include "chips.h"
|
||||||
|
|
||||||
#include "Xmd.h"
|
#include <X11/Xmd.h>
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
|
@ -147,7 +147,7 @@ static CARD32 byteStride;
|
||||||
static CARD32 bytesPerPixel;
|
static CARD32 bytesPerPixel;
|
||||||
static CARD32 pixelStride;
|
static CARD32 pixelStride;
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsSet (ScreenPtr pScreen)
|
chipsSet (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
|
@ -182,7 +182,7 @@ chipsSet (ScreenPtr pScreen)
|
||||||
|
|
||||||
#define DBG(x)
|
#define DBG(x)
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsPitch (int src, int dst)
|
chipsPitch (int src, int dst)
|
||||||
{
|
{
|
||||||
CARD32 p;
|
CARD32 p;
|
||||||
|
@ -196,7 +196,7 @@ chipsPitch (int src, int dst)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsBg (Pixel bg)
|
chipsBg (Pixel bg)
|
||||||
{
|
{
|
||||||
DBG(ErrorF ("\tbg 0x%x\n", bg));
|
DBG(ErrorF ("\tbg 0x%x\n", bg));
|
||||||
|
@ -207,7 +207,7 @@ chipsBg (Pixel bg)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsFg (Pixel fg)
|
chipsFg (Pixel fg)
|
||||||
{
|
{
|
||||||
DBG(ErrorF ("\tfg 0x%x\n", fg));
|
DBG(ErrorF ("\tfg 0x%x\n", fg));
|
||||||
|
@ -218,7 +218,7 @@ chipsFg (Pixel fg)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsOp (CARD32 op)
|
chipsOp (CARD32 op)
|
||||||
{
|
{
|
||||||
DBG(ErrorF ("\top 0x%x\n", op));
|
DBG(ErrorF ("\top 0x%x\n", op));
|
||||||
|
@ -229,7 +229,7 @@ chipsOp (CARD32 op)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsRopSolid (int rop)
|
chipsRopSolid (int rop)
|
||||||
{
|
{
|
||||||
CARD32 op;
|
CARD32 op;
|
||||||
|
@ -238,7 +238,7 @@ chipsRopSolid (int rop)
|
||||||
chipsOp (op);
|
chipsOp (op);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsSrc (int addr)
|
chipsSrc (int addr)
|
||||||
{
|
{
|
||||||
DBG(ErrorF ("\tsrc 0x%x\n", addr));
|
DBG(ErrorF ("\tsrc 0x%x\n", addr));
|
||||||
|
@ -249,7 +249,7 @@ chipsSrc (int addr)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsDst (int addr)
|
chipsDst (int addr)
|
||||||
{
|
{
|
||||||
DBG(ErrorF ("\tdst 0x%x\n", addr));
|
DBG(ErrorF ("\tdst 0x%x\n", addr));
|
||||||
|
@ -260,7 +260,7 @@ chipsDst (int addr)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsWidthHeightGo (int w, int h)
|
chipsWidthHeightGo (int w, int h)
|
||||||
{
|
{
|
||||||
DBG(ErrorF ("\twidth height %d/%d\n", w, h));
|
DBG(ErrorF ("\twidth height %d/%d\n", w, h));
|
||||||
|
@ -271,8 +271,8 @@ chipsWidthHeightGo (int w, int h)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsWaitIdle ()
|
chipsWaitIdle (void)
|
||||||
{
|
{
|
||||||
#ifdef HIQV
|
#ifdef HIQV
|
||||||
int timeout = 0;
|
int timeout = 0;
|
||||||
|
@ -304,8 +304,8 @@ chipsWaitIdle ()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
static Bool
|
||||||
chipsPrepareSolid (DrawablePtr pDrawable,
|
chipsPrepareSolid (PixmapPtr pPixmap,
|
||||||
int alu,
|
int alu,
|
||||||
Pixel pm,
|
Pixel pm,
|
||||||
Pixel fg)
|
Pixel fg)
|
||||||
|
@ -313,14 +313,14 @@ chipsPrepareSolid (DrawablePtr pDrawable,
|
||||||
FbBits depthMask;
|
FbBits depthMask;
|
||||||
|
|
||||||
DBG(ErrorF ("PrepareSolid %d 0x%x\n", alu, fg));
|
DBG(ErrorF ("PrepareSolid %d 0x%x\n", alu, fg));
|
||||||
depthMask = FbFullMask(pDrawable->depth);
|
depthMask = FbFullMask(pPixmap->drawable.depth);
|
||||||
if ((pm & depthMask) != depthMask)
|
if ((pm & depthMask) != depthMask)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
chipsSet (pDrawable->pScreen);
|
chipsSet (pPixmap->drawable.pScreen);
|
||||||
chipsWaitIdle ();
|
chipsWaitIdle ();
|
||||||
chipsFillPix(pDrawable->bitsPerPixel,fg);
|
chipsFillPix(pPixmap->drawable.bitsPerPixel,fg);
|
||||||
chipsFg (fg);
|
chipsFg (fg);
|
||||||
chipsBg (fg);
|
chipsBg (fg);
|
||||||
chipsRopSolid (alu);
|
chipsRopSolid (alu);
|
||||||
|
@ -329,7 +329,7 @@ chipsPrepareSolid (DrawablePtr pDrawable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsSolid (int x1, int y1, int x2, int y2)
|
chipsSolid (int x1, int y1, int x2, int y2)
|
||||||
{
|
{
|
||||||
CARD32 dst;
|
CARD32 dst;
|
||||||
|
@ -344,15 +344,16 @@ chipsSolid (int x1, int y1, int x2, int y2)
|
||||||
chipsWidthHeightGo (w, h);
|
chipsWidthHeightGo (w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsDoneSolid (void)
|
chipsDoneSolid (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static CARD32 copyOp;
|
static CARD32 copyOp;
|
||||||
Bool
|
|
||||||
chipsPrepareCopy (DrawablePtr pSrcDrawable,
|
static Bool
|
||||||
DrawablePtr pDstDrawable,
|
chipsPrepareCopy (PixmapPtr pSrcPixmap,
|
||||||
|
PixmapPtr pDstPixmap,
|
||||||
int dx,
|
int dx,
|
||||||
int dy,
|
int dy,
|
||||||
int alu,
|
int alu,
|
||||||
|
@ -361,7 +362,7 @@ chipsPrepareCopy (DrawablePtr pSrcDrawable,
|
||||||
FbBits depthMask;
|
FbBits depthMask;
|
||||||
|
|
||||||
DBG(ErrorF ("PrepareSolid %d 0x%x\n", alu, fg));
|
DBG(ErrorF ("PrepareSolid %d 0x%x\n", alu, fg));
|
||||||
depthMask = FbFullMask(pDstDrawable->depth);
|
depthMask = FbFullMask(pDstPixmap->drawable.depth);
|
||||||
if ((pm & depthMask) != depthMask)
|
if ((pm & depthMask) != depthMask)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
|
@ -375,7 +376,7 @@ chipsPrepareCopy (DrawablePtr pSrcDrawable,
|
||||||
copyOp |= ctLEFT2RIGHT;
|
copyOp |= ctLEFT2RIGHT;
|
||||||
else
|
else
|
||||||
copyOp |= ctRIGHT2LEFT;
|
copyOp |= ctRIGHT2LEFT;
|
||||||
chipsSet (pDstDrawable->pScreen);
|
chipsSet (pDstPixmap->drawable.pScreen);
|
||||||
chipsWaitIdle ();
|
chipsWaitIdle ();
|
||||||
chipsOp (copyOp);
|
chipsOp (copyOp);
|
||||||
chipsPitch (byteStride, byteStride);
|
chipsPitch (byteStride, byteStride);
|
||||||
|
@ -383,7 +384,7 @@ chipsPrepareCopy (DrawablePtr pSrcDrawable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsCopy (int srcX,
|
chipsCopy (int srcX,
|
||||||
int srcY,
|
int srcY,
|
||||||
int dstX,
|
int dstX,
|
||||||
|
@ -418,12 +419,12 @@ chipsCopy (int srcX,
|
||||||
chipsWidthHeightGo (w * bytesPerPixel, h);
|
chipsWidthHeightGo (w * bytesPerPixel, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
chipsDoneCopy (void)
|
chipsDoneCopy (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
KaaScreenPrivRec chipsKaa = {
|
KaaScreenInfoRec chipsKaa = {
|
||||||
chipsPrepareSolid,
|
chipsPrepareSolid,
|
||||||
chipsSolid,
|
chipsSolid,
|
||||||
chipsDoneSolid,
|
chipsDoneSolid,
|
||||||
|
@ -431,13 +432,14 @@ KaaScreenPrivRec chipsKaa = {
|
||||||
chipsPrepareCopy,
|
chipsPrepareCopy,
|
||||||
chipsCopy,
|
chipsCopy,
|
||||||
chipsDoneCopy,
|
chipsDoneCopy,
|
||||||
|
|
||||||
|
0, 0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
chipsDrawInit (ScreenPtr pScreen)
|
chipsDrawInit (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
chipsScreenInfo(pScreenPriv);
|
|
||||||
|
|
||||||
switch (pScreenPriv->screen->fb[0].bitsPerPixel) {
|
switch (pScreenPriv->screen->fb[0].bitsPerPixel) {
|
||||||
case 8:
|
case 8:
|
||||||
|
@ -458,7 +460,7 @@ chipsDrawEnable (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
chipsScreenInfo(pScreenPriv);
|
chipsScreenInfo(pScreenPriv);
|
||||||
CARD8 mode;
|
CARD8 mode = 0x00;
|
||||||
|
|
||||||
switch (pScreenPriv->screen->fb[0].bitsPerPixel) {
|
switch (pScreenPriv->screen->fb[0].bitsPerPixel) {
|
||||||
case 8:
|
case 8:
|
||||||
|
|
Loading…
Reference in New Issue