aboutsummaryrefslogtreecommitdiff
path: root/libXrender
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 15:05:45 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 15:05:45 +0200
commit4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8 (patch)
tree3ddf28be6916dd5ea27837431b5be8c94017cd9a /libXrender
parent5564e91e3cf4ba5cb2fbebbc2d63d18f588016b8 (diff)
parent5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 (diff)
downloadvcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.gz
vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.bz2
vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'libXrender')
-rw-r--r--libXrender/autogen.sh12
-rw-r--r--libXrender/configure.ac96
-rw-r--r--libXrender/doc/libXrender.txt6
-rw-r--r--libXrender/src/Color.c12
-rw-r--r--libXrender/src/Xrender.c64
-rw-r--r--libXrender/src/Xrenderint.h4
6 files changed, 89 insertions, 105 deletions
diff --git a/libXrender/autogen.sh b/libXrender/autogen.sh
deleted file mode 100644
index 904cd6746..000000000
--- a/libXrender/autogen.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-
-autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
-
-$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/libXrender/configure.ac b/libXrender/configure.ac
index 57ae66e37..bf7fe60dc 100644
--- a/libXrender/configure.ac
+++ b/libXrender/configure.ac
@@ -1,67 +1,65 @@
-dnl
-dnl Copyright © 2003 Keith Packard, Noah Levitt
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation, and that the name of Keith Packard not be used in
-dnl advertising or publicity pertaining to distribution of the software without
-dnl specific, written prior permission. Keith Packard makes no
-dnl representations about the suitability of this software for any purpose. It
-dnl is provided "as is" without express or implied warranty.
-dnl
-dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-dnl PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Process this file with autoconf to create configure.
+#
+# Copyright © 2003 Keith Packard, Noah Levitt
+#
+# 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.
+#
+# Initialize Autoconf
AC_PREREQ([2.60])
+#
+# Version should match the current Render version. XRenderQueryVersion
+# returns the version from render.h, NOT the version we set here. But we
+# try to keep these the same. Note that the library has an extra
+# digit in the version number to track changes which don't affect the
+# protocol, so Xrender version l.n.m corresponds to protocol version l.n
+#
+AC_INIT(libXrender, [0.9.7],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXrender])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
-dnl
-dnl Version should match the current Render version. XRenderQueryVersion
-dnl returns the version from render.h, NOT the version we set here. But we
-dnl try to keep these the same. Note that the library has an extra
-dnl digit in the version number to track changes which don't affect the
-dnl protocol, so Xrender version l.n.m corresponds to protocol version l.n
-dnl
-AC_INIT(libXrender,
- 0.9.6,
- [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
- libXrender)
+# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Initialize libtool
+AC_PROG_LIBTOOL
+
+# Require X.Org macros 1.8 or later for AC_PROG_INSTALL
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
-AM_CONFIG_HEADER(config.h)
-
-# Check for progs
-AC_PROG_CC
-AC_PROG_LIBTOOL
+XORG_CHECK_MALLOC_ZERO
# Check render configuration, strip extra digits from package version to
# find the required protocol version
-
if test "$VERSION" = "" ; then
VERSION=$PACKAGE_VERSION;
fi
RENDER_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
AC_SUBST(RENDER_VERSION)
-PKG_CHECK_MODULES(RENDER, x11 renderproto >= $RENDER_VERSION)
-AC_SUBST(RENDER_CFLAGS)
-XORG_CHECK_MALLOC_ZERO
-
-AC_OUTPUT([Makefile
- src/Makefile
- xrender.pc])
+# Obtain compiler/linker options for depedencies
+PKG_CHECK_MODULES(RENDER, x11 renderproto >= $RENDER_VERSION)
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ xrender.pc])
+AC_OUTPUT
diff --git a/libXrender/doc/libXrender.txt b/libXrender/doc/libXrender.txt
index 79af0345a..27cc75d72 100644
--- a/libXrender/doc/libXrender.txt
+++ b/libXrender/doc/libXrender.txt
@@ -273,7 +273,7 @@ Finds the PictFormat suitable for use with the specified visual.
#define PictStandardA1 4
#define PictStandardNUM 5
-As a convenience, this function locates PictFormats that coorespond to
+As a convenience, this function locates PictFormats that correspond to
commonly used formats.
ARGB32 depth 32, bits 31-24 A, 23-16 R, 15-8 G, 7-0 B
@@ -282,7 +282,7 @@ commonly used formats.
A4 depth 4, bits 3-0 A
A1 depth 1, bits 0 A
-Any server supporting Render must have a PictFormat cooresponding to each of
+Any server supporting Render must have a PictFormat corresponding to each of
these standard formats.
3.4 Index type PictFormat color values
@@ -330,7 +330,7 @@ Free this structure with XFree.
#define CPPolyMode (1 << 10)
#define CPDither (1 << 11)
#define CPComponentAlpha (1 << 12)
- #define CPLastBit 11
+ #define CPLastBit 12
Creates a picture for drawable in the specified format. Any values
specified in 'attributes' and 'valuemask' are used in place of the default
diff --git a/libXrender/src/Color.c b/libXrender/src/Color.c
index 4f934f038..23ef8008b 100644
--- a/libXrender/src/Color.c
+++ b/libXrender/src/Color.c
@@ -29,14 +29,14 @@
Status
XRenderParseColor(Display *dpy, char *spec, XRenderColor *def)
{
-
+
if (!strncmp (spec, "rgba:", 5))
{
unsigned short elements[4];
unsigned short *pShort;
int i, n;
char c;
-
+
spec += 5;
/*
* Attempt to parse the value portion.
@@ -76,7 +76,7 @@ XRenderParseColor(Display *dpy, char *spec, XRenderColor *def)
{
XColor coreColor;
Colormap colormap;
-
+
colormap = DefaultColormap (dpy, DefaultScreen (dpy));
if (!XParseColor (dpy, colormap, spec, &coreColor))
return 0;
@@ -85,8 +85,8 @@ XRenderParseColor(Display *dpy, char *spec, XRenderColor *def)
def->blue = coreColor.blue;
def->alpha = 0xffff;
}
- def->red = (def->red * def->alpha) / 65535;
- def->green = (def->green * def->alpha) / 65535;
- def->blue = (def->blue * def->alpha) / 65535;
+ def->red = (def->red * def->alpha) / 0xffffU;
+ def->green = (def->green * def->alpha) / 0xffffU;
+ def->blue = (def->blue * def->alpha) / 0xffffU;
return 1;
}
diff --git a/libXrender/src/Xrender.c b/libXrender/src/Xrender.c
index c7630766f..769503a6a 100644
--- a/libXrender/src/Xrender.c
+++ b/libXrender/src/Xrender.c
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* 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
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -38,7 +38,7 @@ static int XRenderCloseDisplay (Display *dpy, XExtCodes *codes);
* XextFindDisplay.)
*/
static XRenderExtDisplayInfo *
-XRenderExtFindDisplay (XRenderExtInfo *extinfo,
+XRenderExtFindDisplay (XRenderExtInfo *extinfo,
Display *dpy)
{
XRenderExtDisplayInfo *dpyinfo;
@@ -46,7 +46,7 @@ XRenderExtFindDisplay (XRenderExtInfo *extinfo,
/*
* see if this was the most recently accessed display
*/
- if ((dpyinfo = extinfo->cur) && dpyinfo->display == dpy)
+ if ((dpyinfo = extinfo->cur) && dpyinfo->display == dpy)
return dpyinfo;
/*
@@ -70,8 +70,8 @@ XRenderExtFindDisplay (XRenderExtInfo *extinfo,
* any screen, tell the application that Render is not present.
*/
-#define DEPTH_MASK(d) (1 << ((d) - 1))
-
+#define DEPTH_MASK(d) (1U << ((d) - 1))
+
/*
* Render requires support for depth 1, 4, 8, 24 and 32 pixmaps
*/
@@ -81,7 +81,7 @@ XRenderExtFindDisplay (XRenderExtInfo *extinfo,
DEPTH_MASK(8) | \
DEPTH_MASK(24) | \
DEPTH_MASK(32))
-
+
typedef struct _DepthCheckRec {
struct _DepthCheckRec *next;
Display *dpy;
@@ -204,11 +204,11 @@ XRenderExtAddDisplay (XRenderExtInfo *extinfo,
dpyinfo->codes = NULL;
/*
- * if the server has the extension, then we can initialize the
+ * if the server has the extension, then we can initialize the
* appropriate function vectors
*/
if (dpyinfo->codes) {
- XESetCloseDisplay (dpy, dpyinfo->codes->extension,
+ XESetCloseDisplay (dpy, dpyinfo->codes->extension,
XRenderCloseDisplay);
} else {
/* The server doesn't have this extension.
@@ -241,7 +241,7 @@ XRenderExtAddDisplay (XRenderExtInfo *extinfo,
* XRenderExtRemoveDisplay - remove the indicated display from the
* extension object. (Replaces XextRemoveDisplay.)
*/
-static int
+static int
XRenderExtRemoveDisplay (XRenderExtInfo *extinfo, Display *dpy)
{
XRenderExtDisplayInfo *dpyinfo, *prev;
@@ -285,7 +285,7 @@ XRenderFindDisplay (Display *dpy)
dpyinfo = XRenderExtFindDisplay (&XRenderExtensionInfo, dpy);
if (!dpyinfo)
- dpyinfo = XRenderExtAddDisplay (&XRenderExtensionInfo, dpy,
+ dpyinfo = XRenderExtAddDisplay (&XRenderExtensionInfo, dpy,
XRenderExtensionName);
return dpyinfo;
}
@@ -295,10 +295,10 @@ XRenderCloseDisplay (Display *dpy, XExtCodes *codes)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
if (info && info->info) XFree (info->info);
-
+
return XRenderExtRemoveDisplay (&XRenderExtensionInfo, dpy);
}
-
+
/****************************************************************************
* *
* Render public interfaces *
@@ -331,8 +331,8 @@ Status XRenderQueryVersion (Display *dpy,
if (!XRenderQueryFormats (dpy))
return 0;
-
- xri = info->info;
+
+ xri = info->info;
*major_versionp = xri->major_version;
*minor_versionp = xri->minor_version;
return 1;
@@ -342,7 +342,7 @@ static XRenderPictFormat *
_XRenderFindFormat (XRenderInfo *xri, PictFormat format)
{
int nf;
-
+
for (nf = 0; nf < xri->nformat; nf++)
if (xri->format[nf].id == format)
return &xri->format[nf];
@@ -360,7 +360,7 @@ typedef struct _renderVersionState {
Bool error;
int major_version;
int minor_version;
-
+
} _XrenderVersionState;
static Bool
@@ -413,7 +413,7 @@ XRenderQueryFormats (Display *dpy)
int nf, ns, nd, nv;
int rlength;
int nbytes;
-
+
RenderCheckExtension (dpy, info, 0);
LockDisplay (dpy);
if (info->info)
@@ -426,19 +426,19 @@ XRenderQueryFormats (Display *dpy)
vreq->renderReqType = X_RenderQueryVersion;
vreq->majorVersion = RENDER_MAJOR;
vreq->minorVersion = RENDER_MINOR;
-
+
async_state.version_seq = dpy->request;
async_state.error = False;
async.next = dpy->async_handlers;
async.handler = _XRenderVersionHandler;
async.data = (XPointer) &async_state;
dpy->async_handlers = &async;
-
+
GetReq (RenderQueryPictFormats, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderQueryPictFormats;
-
- if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
+
+ if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
DeqAsyncHandler (dpy, &async);
UnlockDisplay (dpy);
@@ -457,7 +457,7 @@ XRenderQueryFormats (Display *dpy)
*/
if (async_state.major_version == 0 && async_state.minor_version < 6)
rep.numSubpixel = 0;
-
+
xri = (XRenderInfo *) Xmalloc (sizeof (XRenderInfo) +
rep.numFormats * sizeof (XRenderPictFormat) +
rep.numScreens * sizeof (XRenderScreen) +
@@ -470,7 +470,7 @@ XRenderQueryFormats (Display *dpy)
rep.numSubpixel * 4);
xData = (void *) Xmalloc (rlength);
nbytes = (int) rep.length << 2;
-
+
if (!xri || !xData || nbytes < rlength)
{
if (xri) Xfree (xri);
@@ -538,7 +538,7 @@ XRenderQueryFormats (Display *dpy)
xDepth = (xPictDepth *) xVisual;
}
screen++;
- xScreen = (xPictScreen *) xDepth;
+ xScreen = (xPictScreen *) xDepth;
}
xSubpixel = (CARD32 *) xScreen;
screen = xri->screen;
@@ -554,7 +554,7 @@ XRenderQueryFormats (Display *dpy)
*/
if (nbytes > rlength)
_XEatData (dpy, (unsigned long) (nbytes - rlength));
-
+
UnlockDisplay (dpy);
SyncHandle ();
Xfree (xData);
@@ -696,7 +696,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRed |
PictFormatRedMask |
@@ -725,7 +725,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRed |
PictFormatRedMask |
@@ -753,7 +753,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
@@ -779,7 +779,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
@@ -805,7 +805,7 @@ XRenderFindStandardFormat (Display *dpy,
},
0, /* colormap */
},
- PictFormatType |
+ PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
@@ -816,7 +816,7 @@ XRenderFindStandardFormat (Display *dpy,
};
if (0 <= format && format < PictStandardNUM)
- return XRenderFindFormat (dpy,
+ return XRenderFindFormat (dpy,
standardFormats[format].mask,
&standardFormats[format].templ,
0);
@@ -870,7 +870,7 @@ XRenderQueryPictIndexValues(Display *dpy,
for(i = 0; i < rep.numIndexValues; i++)
{
xIndexValue value;
-
+
_XRead (dpy, (char *) &value, SIZEOF (xIndexValue));
values[i].pixel = value.pixel;
values[i].red = value.red;
diff --git a/libXrender/src/Xrenderint.h b/libXrender/src/Xrenderint.h
index 49a294b14..57b13dac2 100644
--- a/libXrender/src/Xrenderint.h
+++ b/libXrender/src/Xrenderint.h
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* 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
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -26,8 +26,6 @@
#define _XRENDERINT_H_
#include "config.h"
-#define NEED_EVENTS
-#define NEED_REPLIES
#include <X11/Xlibint.h>
#include <X11/Xutil.h>
#include <X11/extensions/renderproto.h>