summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:33:21 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:33:21 +0000
commit3c73e8227ffd559ae7b8aaf6f89929bda8e51421 (patch)
tree68f2e6a56720ff0b13ef5100e50fba4973e00e59 /src
parent231ec9ffb13e4d4536fce9dceab545d9edcb9dba (diff)
Diffstat (limited to 'src')
-rw-r--r--src/AddTrap.c67
-rw-r--r--src/Color.c1
-rw-r--r--src/Composite.c1
-rw-r--r--src/Cursor.c1
-rw-r--r--src/FillRect.c1
-rw-r--r--src/FillRects.c1
-rw-r--r--src/Filter.c1
-rw-r--r--src/Glyph.c1
-rw-r--r--src/Picture.c1
-rw-r--r--src/Poly.c1
-rw-r--r--src/Trap.c1
-rw-r--r--src/Tri.c1
-rw-r--r--src/Xrender.c2
-rw-r--r--src/Xrenderint.h1
14 files changed, 68 insertions, 13 deletions
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.
*