Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework

This commit is contained in:
Ian Romanick 2007-02-14 15:39:52 -08:00
commit c4fe1bcce1
9 changed files with 87 additions and 46 deletions

View File

@ -448,6 +448,9 @@ AC_ARG_WITH(os-name, AS_HELP_STRING([--with-os-name=OSNAME], [Name of OS
AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]), AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]),
[ OSVENDOR="$withval" ], [ OSVENDOR="$withval" ],
[ OSVENDOR="" ]) [ OSVENDOR="" ])
AC_ARG_WITH(builderstring, AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]),
[ BUILDERSTRING="$withval" ]
[ ])
AC_ARG_WITH(mesa-source, AS_HELP_STRING([--with-mesa-source=MESA_SOURCE], [Path to Mesa source tree]), AC_ARG_WITH(mesa-source, AS_HELP_STRING([--with-mesa-source=MESA_SOURCE], [Path to Mesa source tree]),
[ MESA_SOURCE="$withval" ], [ MESA_SOURCE="$withval" ],
[ MESA_SOURCE="" ]) [ MESA_SOURCE="" ])
@ -934,6 +937,8 @@ AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man versio
AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address]) AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address])
AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name]) AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name])
AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor]) AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor])
AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string])
AC_SUBST([VENDOR_STRING]) AC_SUBST([VENDOR_STRING])
AC_SUBST([VENDOR_STRING_SHORT]) AC_SUBST([VENDOR_STRING_SHORT])
AC_SUBST([VENDOR_RELEASE]) AC_SUBST([VENDOR_RELEASE])

View File

@ -489,6 +489,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE);
DeviceIntPtr cp = inputInfo.pointer; DeviceIntPtr cp = inputInfo.pointer;
int x = 0, y = 0; int x = 0, y = 0;
Bool coreOnly = (pDev == inputInfo.pointer);
/* Sanity checks. */ /* Sanity checks. */
if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) if (type != MotionNotify && type != ButtonPress && type != ButtonRelease)
@ -497,7 +498,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) if ((type == ButtonPress || type == ButtonRelease) && !pDev->button)
return 0; return 0;
if (pDev->coreEvents) if (!coreOnly && pDev->coreEvents)
num_events = 2; num_events = 2;
else else
num_events = 1; num_events = 1;
@ -507,7 +508,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
} }
/* Do we need to send a DeviceValuator event? */ /* Do we need to send a DeviceValuator event? */
if (sendValuators) { if (!coreOnly && sendValuators) {
if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS)
num_valuators = MAX_VALUATOR_EVENTS * 6; num_valuators = MAX_VALUATOR_EVENTS * 6;
num_events += ((num_valuators - 1) / 6) + 1; num_events += ((num_valuators - 1) / 6) + 1;
@ -521,10 +522,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
ms = GetTimeInMillis(); ms = GetTimeInMillis();
kbp = (deviceKeyButtonPointer *) events;
kbp->time = ms;
kbp->deviceid = pDev->id;
/* Set x and y based on whether this is absolute or relative, and /* Set x and y based on whether this is absolute or relative, and
* accelerate if we need to. */ * accelerate if we need to. */
if (flags & POINTER_ABSOLUTE) { if (flags & POINTER_ABSOLUTE) {
@ -602,29 +599,37 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
pDev->valuator->lastx = x; pDev->valuator->lastx = x;
pDev->valuator->lasty = y; pDev->valuator->lasty = y;
if (type == MotionNotify) { if (!coreOnly)
kbp->type = DeviceMotionNotify; {
} kbp = (deviceKeyButtonPointer *) events;
else { kbp->time = ms;
if (type == ButtonPress) kbp->deviceid = pDev->id;
kbp->type = DeviceButtonPress;
else if (type == ButtonRelease) if (type == MotionNotify) {
kbp->type = DeviceButtonRelease; kbp->type = DeviceMotionNotify;
kbp->detail = pDev->button->map[buttons]; }
else {
if (type == ButtonPress)
kbp->type = DeviceButtonPress;
else if (type == ButtonRelease)
kbp->type = DeviceButtonRelease;
kbp->detail = pDev->button->map[buttons];
}
kbp->root_x = x;
kbp->root_y = y;
events++;
if (sendValuators) {
kbp->deviceid |= MORE_EVENTS;
clipValuators(pDev, first_valuator, num_valuators, valuators);
events = getValuatorEvents(events, pDev, first_valuator,
num_valuators, valuators);
}
} }
kbp->root_x = x; /* for some reason inputInfo.pointer does not have coreEvents set */
kbp->root_y = y; if (coreOnly || pDev->coreEvents) {
events++;
if (sendValuators) {
kbp->deviceid |= MORE_EVENTS;
clipValuators(pDev, first_valuator, num_valuators, valuators);
events = getValuatorEvents(events, pDev, first_valuator,
num_valuators, valuators);
}
if (pDev->coreEvents) {
events->u.u.type = type; events->u.u.type = type;
events->u.keyButtonPointer.time = ms; events->u.keyButtonPointer.time = ms;
events->u.keyButtonPointer.rootX = x; events->u.keyButtonPointer.rootX = x;

View File

@ -648,6 +648,14 @@ exaPolyFillRect(DrawablePtr pDrawable,
{ {
exaDoMigration (pixmaps, 1, FALSE); exaDoMigration (pixmaps, 1, FALSE);
ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect); ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect);
while (nrect-- >= 0) {
exaDrawableDirty(pDrawable,
pDrawable->x + prect->x,
pDrawable->y + prect->y,
pDrawable->x + prect->x + prect->width,
pDrawable->y + prect->y + prect->height);
prect++;
}
return; return;
} else { } else {
exaDoMigration (pixmaps, 1, TRUE); exaDoMigration (pixmaps, 1, TRUE);

View File

@ -572,9 +572,7 @@ exaComposite(CARD8 op,
if (pExaScr->swappedOut || if (pExaScr->swappedOut ||
pSrc->pDrawable == NULL || (pMask != NULL && pMask->pDrawable == NULL)) pSrc->pDrawable == NULL || (pMask != NULL && pMask->pDrawable == NULL))
{ {
ExaCheckComposite (op, pSrc, pMask, pDst, xSrc, ySrc, goto fallback;
xMask, yMask, xDst, yDst, width, height);
return;
} }
/* Remove repeat in source if useless */ /* Remove repeat in source if useless */
@ -683,12 +681,18 @@ exaComposite(CARD8 op,
} }
} }
fallback:
#if DEBUG_TRACE_FALL #if DEBUG_TRACE_FALL
exaPrintCompositeFallback (op, pSrc, pMask, pDst); exaPrintCompositeFallback (op, pSrc, pMask, pDst);
#endif #endif
ExaCheckComposite (op, pSrc, pMask, pDst, xSrc, ySrc, ExaCheckComposite (op, pSrc, pMask, pDst, xSrc, ySrc,
xMask, yMask, xDst, yDst, width, height); xMask, yMask, xDst, yDst, width, height);
exaDrawableDirty(pDst->pDrawable,
pDst->pDrawable->x + xDst,
pDst->pDrawable->y + yDst,
pDst->pDrawable->x + xDst + width,
pDst->pDrawable->y + yDst + height);
done: done:
pSrc->repeat = saveSrcRepeat; pSrc->repeat = saveSrcRepeat;
@ -995,15 +999,17 @@ exaGlyphs (CARD8 op,
* First we try to use UploadToScreen, if we can, then we fall back * First we try to use UploadToScreen, if we can, then we fall back
* to a plain exaCopyArea in case of failure. * to a plain exaCopyArea in case of failure.
*/ */
if (!pExaScr->info->UploadToScreen || if (pExaScr->info->UploadToScreen &&
!exaPixmapIsOffscreen(pPixmap) || exaPixmapIsOffscreen(pPixmap) &&
!(*pExaScr->info->UploadToScreen) (pPixmap, 0, 0, (*pExaScr->info->UploadToScreen) (pPixmap, 0, 0,
glyph->info.width, glyph->info.width,
glyph->info.height, glyph->info.height,
glyphdata, glyphdata,
PixmapBytePad(glyph->info.width, PixmapBytePad(glyph->info.width,
list->format->depth))) list->format->depth)))
{ {
exaMarkSync (pScreen);
} else {
/* Set up the scratch pixmap/GC for doing a CopyArea. */ /* Set up the scratch pixmap/GC for doing a CopyArea. */
if (pScratchPixmap == NULL) { if (pScratchPixmap == NULL) {
/* Get a scratch pixmap to wrap the original glyph data */ /* Get a scratch pixmap to wrap the original glyph data */

View File

@ -47,13 +47,6 @@ configurations, doing batch processing with \fIXvfb\fP as a background
rendering engine, load testing, as an aid to porting the X server to a rendering engine, load testing, as an aid to porting the X server to a
new platform, and providing an unobtrusive way to run applications new platform, and providing an unobtrusive way to run applications
that don't really need an X server but insist on having one anyway. that don't really need an X server but insist on having one anyway.
.SH BUILDING
To build \fIXvfb\fP, put the following in your host.def and remake.
.PP
\&#define BuildServer YES /\(** if you aren't already building other servers */
.br
\&#define XVirtualFramebufferServer YES
.SH OPTIONS .SH OPTIONS
.PP .PP
In addition to the normal server options described in the \fIXserver(1)\fP In addition to the normal server options described in the \fIXserver(1)\fP
@ -116,14 +109,14 @@ The server will listen for connections as server number 1, will have the
default screen configuration (one screen, 1280x1024x12), and screen 1 default screen configuration (one screen, 1280x1024x12), and screen 1
will be depth 16 1600x1200. will be depth 16 1600x1200.
.TP 8 .TP 8
Xvfb -pixdepths 3 27 -fbdir /usr/tmp Xvfb -pixdepths 3 27 -fbdir /var/tmp
The server will listen for connections as server number 0, will have the The server will listen for connections as server number 0, will have the
default screen configuration (one screen, 1280x1024x12), default screen configuration (one screen, 1280x1024x12),
will also support pixmap will also support pixmap
depths of 3 and 27, depths of 3 and 27,
and will use memory mapped files in /usr/tmp for the framebuffer. and will use memory mapped files in /var/tmp for the framebuffer.
.TP 8 .TP 8
xwud -in /usr/tmp/Xvfb_screen0 xwud -in /var/tmp/Xvfb_screen0
Displays screen 0 of the server started by the preceding example. Displays screen 0 of the server started by the preceding example.
.SH "SEE ALSO" .SH "SEE ALSO"
.PP .PP

View File

@ -428,7 +428,7 @@ typedef int xf86jmp_buf[1024];
#define toupper(i) xf86toupper(i) #define toupper(i) xf86toupper(i)
#undef ungetc #undef ungetc
#define ungetc(i,FP) xf86ungetc(i,FP) #define ungetc(i,FP) xf86ungetc(i,FP)
#undef vfprinf #undef vfprintf
#define vfprintf(p,f,a) xf86vfprintf(p,f,a) #define vfprintf(p,f,a) xf86vfprintf(p,f,a)
#undef vsnprintf #undef vsnprintf
#define vsnprintf(s,n,f,a) xf86vsnprintf(s,n,f,a) #define vsnprintf(s,n,f,a) xf86vsnprintf(s,n,f,a)

View File

@ -46,8 +46,6 @@ libxf4bpp_la_SOURCES = \
mfbzerarc.c \ mfbzerarc.c \
vgamodule.c vgamodule.c
libxf4bpp_la_LIBADD = ../xf1bpp/libxf1bpp.la
EXTRA_DIST = OScompiler.h ibmTrace.h ppcGCstr.h ppcSpMcro.h vgaReg.h \ EXTRA_DIST = OScompiler.h ibmTrace.h ppcGCstr.h ppcSpMcro.h vgaReg.h \
vgaVideo.h wm3.h NOTES vgaVideo.h wm3.h NOTES

View File

@ -15,6 +15,9 @@
/* Operating System Vendor */ /* Operating System Vendor */
#undef OSVENDOR #undef OSVENDOR
/* Builder string */
#undef BUILDERSTRING
/* Default font path */ /* Default font path */
#undef COMPILEDDEFAULTFONTPATH #undef COMPILEDDEFAULTFONTPATH

View File

@ -474,6 +474,10 @@ void
miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y,
unsigned long time) unsigned long time)
{ {
xEvent* events;
int i, nevents;
int valuators[2];
SetupScreen(pScreen); SetupScreen(pScreen);
if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer) && if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer) &&
@ -488,4 +492,23 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y,
miPointer.x = x; miPointer.x = x;
miPointer.y = y; miPointer.y = y;
miPointer.pScreen = pScreen; miPointer.pScreen = pScreen;
/* generate motion notify */
valuators[0] = x;
valuators[1] = y;
events = (xEvent*)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
if (!events)
{
FatalError("Could not allocate event store.\n");
return;
}
nevents = GetPointerEvents(events, pDev, MotionNotify, 0,
POINTER_ABSOLUTE, 0, 2, valuators);
for (i = 0; i < nevents; i++)
mieqEnqueue(pDev, &events[i]);
xfree(events);
} }