From 3c73e8227ffd559ae7b8aaf6f89929bda8e51421 Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Wed, 15 Sep 2004 16:33:21 +0000 Subject: Pull XORG-6_8_0 to CYGWIN branch --- include/X11/extensions/Xrender.h | 18 ++++++++++- src/AddTrap.c | 67 ++++++++++++++++++++++++++++++++++++++++ src/Color.c | 1 - src/Composite.c | 1 - src/Cursor.c | 1 - src/FillRect.c | 1 - src/FillRects.c | 1 - src/Filter.c | 1 - src/Glyph.c | 1 - src/Picture.c | 1 - src/Poly.c | 1 - src/Trap.c | 1 - src/Tri.c | 1 - src/Xrender.c | 2 +- src/Xrenderint.h | 1 - 15 files changed, 85 insertions(+), 14 deletions(-) create mode 100644 src/AddTrap.c diff --git a/include/X11/extensions/Xrender.h b/include/X11/extensions/Xrender.h index 654e8c1..d2cf6e5 100644 --- a/include/X11/extensions/Xrender.h +++ b/include/X11/extensions/Xrender.h @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2000 SuSE, Inc. * @@ -170,6 +169,14 @@ typedef struct _XAnimCursor { unsigned long delay; } XAnimCursor; +typedef struct _XSpanFix { + XFixed left, right, y; +} XSpanFix; + +typedef struct _XTrap { + XSpanFix top, bottom; +} XTrap; + _XFUNCPROTOBEGIN Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep); @@ -465,6 +472,15 @@ XRenderCreateAnimCursor (Display *dpy, int ncursor, XAnimCursor *cursors); + +void +XRenderAddTraps (Display *dpy, + Picture picture, + int xOff, + int yOff, + _Xconst XTrap *traps, + int ntrap); + _XFUNCPROTOEND #endif /* _XRENDER_H_ */ diff --git a/src/AddTrap.c b/src/AddTrap.c new file mode 100644 index 0000000..0449257 --- /dev/null +++ b/src/AddTrap.c @@ -0,0 +1,67 @@ +/* + * $Id$ + * + * Copyright © 2004 Keith Packard + * + * 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, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#include "Xrenderint.h" + +#define NLOCAL 256 + +void +XRenderAddTraps (Display *dpy, + Picture picture, + int xOff, + int yOff, + _Xconst XTrap *traps, + int ntrap) +{ + XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderAddTrapsReq *req; + int n; + long len; + unsigned long max_req = dpy->bigreq_size ? dpy->bigreq_size : dpy->max_request_size; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + while (ntrap) + { + GetReq(RenderAddTraps, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderAddTraps; + req->picture = picture; + req->xOff = xOff; + req->yOff = yOff; + n = ntrap; + len = ((long) n) * (SIZEOF (xTrap) >> 2); + if (len > (max_req - req->length)) { + n = (max_req - req->length) / (SIZEOF (xTrap) >> 2); + len = ((long)n) * (SIZEOF (xTrap) >> 2); + } + SetReqLen (req, len, len); + len <<= 2; + DataInt32 (dpy, (int *) traps, len); + ntrap -= n; + traps += n; + } + UnlockDisplay(dpy); + SyncHandle(); +} diff --git a/src/Color.c b/src/Color.c index c9ecfc8..39d79e0 100644 --- a/src/Color.c +++ b/src/Color.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2002 Keith Packard * diff --git a/src/Composite.c b/src/Composite.c index 386c042..274c93b 100644 --- a/src/Composite.c +++ b/src/Composite.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2000 SuSE, Inc. * diff --git a/src/Cursor.c b/src/Cursor.c index 13a1fae..8b783d8 100644 --- a/src/Cursor.c +++ b/src/Cursor.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2002 Keith Packard * diff --git a/src/FillRect.c b/src/FillRect.c index 11097a8..396cfe0 100644 --- a/src/FillRect.c +++ b/src/FillRect.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2000 SuSE, Inc. * diff --git a/src/FillRects.c b/src/FillRects.c index 2eebe1a..72e0a90 100644 --- a/src/FillRects.c +++ b/src/FillRects.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2000 SuSE, Inc. * diff --git a/src/Filter.c b/src/Filter.c index c963768..3406669 100644 --- a/src/Filter.c +++ b/src/Filter.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2002 Keith Packard * diff --git a/src/Glyph.c b/src/Glyph.c index 2d0f2c3..d221ea5 100644 --- a/src/Glyph.c +++ b/src/Glyph.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2000 SuSE, Inc. * diff --git a/src/Picture.c b/src/Picture.c index 961f551..d6652ff 100644 --- a/src/Picture.c +++ b/src/Picture.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2000 SuSE, Inc. * diff --git a/src/Poly.c b/src/Poly.c index 5d482e3..12a9732 100644 --- a/src/Poly.c +++ b/src/Poly.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2002 Keith Packard * diff --git a/src/Trap.c b/src/Trap.c index 8fd4512..e9a7deb 100644 --- a/src/Trap.c +++ b/src/Trap.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2002 Keith Packard * diff --git a/src/Tri.c b/src/Tri.c index 5c60dd6..1f0a80a 100644 --- a/src/Tri.c +++ b/src/Tri.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2002 Keith Packard * diff --git a/src/Xrender.c b/src/Xrender.c index 976f345..7ad8291 100644 --- a/src/Xrender.c +++ b/src/Xrender.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2000 SuSE, Inc. * @@ -105,6 +104,7 @@ XRenderDepthCheckErrorHandler (Display *dpy, XErrorEvent *evt) } _XUnlockMutex (_Xglobal_lock); } + return 0; } static Bool diff --git a/src/Xrenderint.h b/src/Xrenderint.h index 41265a5..49a294b 100644 --- a/src/Xrenderint.h +++ b/src/Xrenderint.h @@ -1,5 +1,4 @@ /* - * $Id$ * * Copyright © 2000 SuSE, Inc. * -- cgit v1.2.3