Commit ebcb6a6e authored by Mike Gabriel's avatar Mike Gabriel

library-cleanup: Don't build libNX_Xrender anymore. Use system's libXrender shared library.

parent 5729783d
......@@ -23,6 +23,7 @@ Build-Depends:
libxfixes-dev,
libxtst-dev,
libxinerama-dev,
libxrender-dev,
autoconf,
pkg-config,
x11proto-core-dev,
......@@ -747,21 +748,16 @@ Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
${shlibs:Depends},
${misc:Depends},
Breaks: nxlibs (<= 3.5.1),
libnx-x11 (<< 2:3.5.0.29-0x2go2~),
Description: nx-X11 Rendering Extension client library
Description: nx-X11 Rendering Extension client library (dummy package)
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
The X Rendering Extension (Render) introduces digital image composition
as the foundation of a new rendering model within the X Window System.
Rendering geometric figures is accomplished by client-side tessellation
into either triangles or trapezoids. Text is drawn by loading glyphs
into the server and rendering sets of them. The Xrender library exposes
this extension to X clients.
This package removes the obsoleted libNX_Xrender.so.1 library. With
recent versions of NX, the system-wide installed libXrender gets used.
.
This package can be safely removed.
Package: libnx-xrender-dev
Provides: libnx-xrender1-dev
......@@ -769,24 +765,17 @@ Section: libdevel
Architecture: any
Multi-Arch: same
Depends:
libnx-xrender1 (= ${binary:Version}),
nx-x11proto-render-dev (= ${binary:Version}),
${misc:Depends},
Breaks: nxlibs (<= 3.5.1),
libnx-x11-dev (<< 2:3.5.0.29-0x2go2~),
Description: nx-X11 Rendering Extension client library (development headers)
Description: nx-X11 Rendering Extension client library (dummy package)
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
The X Rendering Extension (Render) introduces digital image composition
as the foundation of a new rendering model within the X Window System.
Rendering geometric figures is accomplished by client-side tessellation
into either triangles or trapezoids. Text is drawn by loading glyphs
into the server and rendering sets of them. The Xrender library exposes
this extension to X clients.
This package removes the obsoleted headers for the libNX_Xrender.so.1
library. With recent versions of NX, the system-wide installed libXrender
gets used.
.
This package contains the development headers for this library.
This package can be safely removed.
Package: nx-x11proto-render-dev
Section: libdevel
......@@ -794,16 +783,16 @@ Architecture: any
Multi-Arch: same
Depends:
${misc:Depends},
Breaks: nxlibs (<= 3.5.1),
libnx-x11-dev (<< 2:3.5.0.29-0x2go2~),
Description: nx-X11 Render extension wire protocol
Description: nx-X11 Render extension wire protocol (dummy package)
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
This package provides development headers describing the wire protocol
for the Render extension, used to implement Porter-Duff operations
within X.
This package removes the obsoleted headers for the libNX_Xrender.so.1
library. With recent versions of NX, the system-wide installed libXrender
gets used.
.
This package can be safely removed.
Package: libnx-xrender1-dbg
Architecture: any
......@@ -811,23 +800,18 @@ Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
libnx-xrender1 (= ${binary:Version}),
${misc:Depends},
Section: debug
Breaks: nx-x11-dbg (<< 2:3.5.0.29-0x2go2~),
Description: nx-X11 Rendering Extension client library (debug package)
Description: nx-X11 Rendering Extension client library (dummy package)
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
The X Rendering Extension (Render) introduces digital image composition
as the foundation of a new rendering model within the X Window System.
Rendering geometric figures is accomplished by client-side tessellation
into either triangles or trapezoids. Text is drawn by loading glyphs
into the server and rendering sets of them. The Xrender library exposes
this extension to X clients.
This package removes the obsoleted debug symbols for the libNX_Xrender.so.1
library. With recent versions of NX, the system-wide installed libXrender
gets used.
.
This package contains debug symbols for this library.
This package can be safely removed.
Package: libnx-xtst6
Architecture: any
......
usr/lib/*/libNX_Xrender.so
usr/include/*/nx-X11/extensions/Xrender.h
usr/lib/*/libNX_Xrender.so.*
libNX_Xrender.so.1 libnx-xrender1 #MINVER#
XRenderAddGlyphs@Base 3.5.0.29
XRenderAddTraps@Base 3.5.0.29
XRenderChangePicture@Base 3.5.0.29
XRenderCleanGlyphs@Base 3.5.0.29
XRenderComposite@Base 3.5.0.29
XRenderCompositeDoublePoly@Base 3.5.0.29
XRenderCompositeString16@Base 3.5.0.29
XRenderCompositeString32@Base 3.5.0.29
XRenderCompositeString8@Base 3.5.0.29
XRenderCompositeText16@Base 3.5.0.29
XRenderCompositeText32@Base 3.5.0.29
XRenderCompositeText8@Base 3.5.0.29
XRenderCompositeTrapezoids@Base 3.5.0.29
XRenderCompositeTriFan@Base 3.5.0.29
XRenderCompositeTriStrip@Base 3.5.0.29
XRenderCompositeTriangles@Base 3.5.0.29
XRenderCreateAnimCursor@Base 3.5.0.29
XRenderCreateConicalGradient@Base 3.5.0.29
XRenderCreateCursor@Base 3.5.0.29
XRenderCreateGlyphSet@Base 3.5.0.29
XRenderCreateLinearGradient@Base 3.5.0.29
XRenderCreatePicture@Base 3.5.0.29
XRenderCreateRadialGradient@Base 3.5.0.29
XRenderCreateSolidFill@Base 3.5.0.29
XRenderExtensionInfo@Base 3.5.0.29
XRenderExtensionName@Base 3.5.0.29
XRenderFillRectangle@Base 3.5.0.29
XRenderFillRectangles@Base 3.5.0.29
XRenderFindDisplay@Base 3.5.0.29
XRenderFindFormat@Base 3.5.0.29
XRenderFindStandardFormat@Base 3.5.0.29
XRenderFindVisualFormat@Base 3.5.0.29
XRenderFreeGlyphSet@Base 3.5.0.29
XRenderFreeGlyphs@Base 3.5.0.29
XRenderFreePicture@Base 3.5.0.29
XRenderParseColor@Base 3.5.0.29
XRenderQueryExtension@Base 3.5.0.29
XRenderQueryFilters@Base 3.5.0.29
XRenderQueryFormats@Base 3.5.0.29
XRenderQueryPictIndexValues@Base 3.5.0.29
XRenderQuerySubpixelOrder@Base 3.5.0.29
XRenderQueryVersion@Base 3.5.0.29
XRenderReferenceGlyphSet@Base 3.5.0.29
XRenderSetPictureClipRectangles@Base 3.5.0.29
XRenderSetPictureClipRegion@Base 3.5.0.29
XRenderSetPictureFilter@Base 3.5.0.29
XRenderSetPictureTransform@Base 3.5.0.29
XRenderSetSubpixelOrder@Base 3.5.0.29
......@@ -77,7 +77,6 @@ override_dh_strip:
dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg
dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg
dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg
dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg
dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg
dh_strip -plibxcompshad3 --dbg-package=libxcompshad3-dbg
dh_strip -plibxcompext3 --dbg-package=libxcompext3-dbg
......
......@@ -281,9 +281,6 @@ XORGRELSTRING = XorgManVersionString
#ifndef BuildRender
#define BuildRender YES
#endif
#ifndef BuildRenderLibrary
#define BuildRenderLibrary !BuildServersOnly
#endif
#ifndef BuildRandR
#define BuildRandR YES
......@@ -1317,31 +1314,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir)
DEPXLIBONLY = $(DEPXONLYLIB)
XLIBONLY = $(XONLYLIB)
LINTXONLYLIB = $(LINTXONLY)
#if BuildRenderLibrary
#ifndef SharedLibXrender
#define SharedLibXrender HasSharedLibraries
#endif
#ifndef NormalLibXrender
#define NormalLibXrender (!SharedLibXrender || ForceNormalLib)
#endif
#ifndef DebugLibXrender
#define DebugLibXrender NO
#endif
#ifndef ProfileLibXrender
#define ProfileLibXrender NO
#endif
#else
#undef SharedLibXrender
#define SharedLibXrender NO
#undef NormalLibXrender
#define NormalLibXrender NO
#undef DebugLibXrender
#define DebugLibXrender NO
#undef ProfileLibXrender
#define ProfileLibXrender NO
#endif
#ifndef SharedLibXext
#define SharedLibXext HasSharedLibraries
#endif
......@@ -1367,17 +1339,6 @@ LINTEXTENSIONLIB = $(LINTEXTENSION)
DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB)
XLIB = $(EXTENSIONLIB) $(XONLYLIB)
LINTXLIB = $(LINTXONLYLIB)
XRENDERLIBSRC = $(LIBSRC)/Xrender
#if SharedLibXrender
#ifndef SharedXrenderRev
#define SharedXrenderRev 1.2.2
#endif
SharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev)
#else
ProjectUnsharedLibReferences(XRENDER,NX_Xrender,$(XRENDERLIBSRC),XBuildLibDir)
#endif
#ifndef SharedLibXau
#define SharedLibXau YES
#endif
......
......@@ -15,10 +15,6 @@ NULL =
XKBLIBDIR = xkbfile
#endif
#if BuildRenderLibrary
RENDERLIBDIR = Xrender
#endif
#if BuildXauLib
XAULIBDIR = Xau
#endif
......@@ -43,7 +39,6 @@ LINTSUBDIRS = \
$(XEXTLIBDIR) \
$(XKBLIBDIR) \
$(XINERAMADIR) \
$(RENDERLIBDIR) \
$(NULL)
SUBDIRS = xtrans $(LINTSUBDIRS)
......
/*
* $Id: AddTrap.c,v 1.4 2005/07/03 07:00:57 daniels Exp $
*
* 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#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();
}
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
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.
*/
pShort = elements;
for (i = 0; i < 4; i++, pShort++, spec++) {
n = 0;
*pShort = 0;
while (*spec != '/' && *spec != '\0') {
if (++n > 4) {
return 0;
}
c = *spec++;
*pShort <<= 4;
if (c >= '0' && c <= '9')
*pShort |= c - '0';
/* assume string in lowercase
else if (c >= 'A' && c <= 'F')
*pShort |= c - ('A' - 10);
*/
else if (c >= 'a' && c <= 'f')
*pShort |= c - ('a' - 10);
else return 0;
}
if (n == 0)
return 0;
if (n < 4) {
*pShort = ((unsigned long)*pShort * 0xFFFF) / ((1 << n*4) - 1);
}
}
def->red = elements[0];
def->green = elements[1];
def->blue = elements[2];
def->alpha = elements[3];
}
else
{
XColor coreColor;
Colormap colormap;
colormap = DefaultColormap (dpy, DefaultScreen (dpy));
if (!XParseColor (dpy, colormap, spec, &coreColor))
return 0;
def->red = coreColor.red;
def->green = coreColor.green;
def->blue = coreColor.blue;
def->alpha = 0xffff;
}
def->red = (def->red * def->alpha) / 0xffffU;
def->green = (def->green * def->alpha) / 0xffffU;
def->blue = (def->blue * def->alpha) / 0xffffU;
return 1;
}
/*
*
* Copyright © 2000 SuSE, Inc.
*
* 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 SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* 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
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
void
XRenderComposite (Display *dpy,
int op,
Picture src,
Picture mask,
Picture dst,
int src_x,
int src_y,
int mask_x,
int mask_y,
int dst_x,
int dst_y,
unsigned int width,
unsigned int height)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderCompositeReq *req;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderComposite, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderComposite;
req->op = (CARD8) op;
req->src = src;
req->mask = mask;
req->dst = dst;
req->xSrc = src_x;
req->ySrc = src_y;
req->xMask = mask_x;
req->yMask = mask_y;
req->xDst = dst_x;
req->yDst = dst_y;
req->width = width;
req->height = height;
UnlockDisplay(dpy);
SyncHandle();
}
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
Cursor
XRenderCreateCursor (Display *dpy,
Picture source,
unsigned int x,
unsigned int y)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Cursor cid;
xRenderCreateCursorReq *req;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateCursor, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateCursor;
req->cid = cid = XAllocID (dpy);
req->src = source;
req->x = x;
req->y = y;
UnlockDisplay(dpy);
SyncHandle();
return cid;
}
Cursor
XRenderCreateAnimCursor (Display *dpy,
int ncursor,
XAnimCursor *cursors)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Cursor cid;
xRenderCreateAnimCursorReq *req;
long len;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateAnimCursor, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateAnimCursor;
req->cid = cid = XAllocID (dpy);
len = (long) ncursor * SIZEOF (xAnimCursorElt) >> 2;
SetReqLen (req, len, len);
len <<= 2;
Data32 (dpy, (long *) cursors, len);
UnlockDisplay(dpy);
SyncHandle();
return cid;
}
/*
*
* Copyright © 2000 SuSE, Inc.
*
* 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 SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* 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
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
/* precompute the maximum size of batching request allowed */
#define size (SIZEOF(xRenderFillRectanglesReq) + FRCTSPERBATCH * SIZEOF(xRectangle))
void
XRenderFillRectangle (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
int x,
int y,
unsigned int width,
unsigned int height)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRectangle *rect;
xRenderFillRectanglesReq *req;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
req = (xRenderFillRectanglesReq *) dpy->last_req;
/* if same as previous request, with same drawable, batch requests */
if (req->reqType == info->codes->major_opcode &&
req->renderReqType == X_RenderFillRectangles &&
req->op == op &&
req->dst == dst &&
req->color.red == color->red &&
req->color.green == color->green &&
req->color.blue == color->blue &&
req->color.alpha == color->alpha &&
dpy->bufptr + SIZEOF(xRectangle) <= dpy->bufmax &&
(char *)dpy->bufptr - (char *)req < size)
{
req->length += SIZEOF(xRectangle) >> 2;
rect = (xRectangle *) dpy->bufptr;
dpy->bufptr += SIZEOF(xRectangle);
}
else
{
GetReqExtra(RenderFillRectangles, SIZEOF(xRectangle), req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderFillRectangles;
req->op = op;
req->dst = dst;
req->color.red = color->red;
req->color.green = color->green;
req->color.blue = color->blue;
req->color.alpha = color->alpha;
rect = (xRectangle *) NEXTPTR(req,xRenderFillRectanglesReq);
}
rect->x = x;
rect->y = y;
rect->width = width;
rect->height = height;
UnlockDisplay(dpy);
SyncHandle();
}
/*
*
* Copyright © 2000 SuSE, Inc.
*
* 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 SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* 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
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
/* precompute the maximum size of batching request allowed */
#define size (SIZEOF(xRenderFillRectanglesReq) + FRCTSPERBATCH * SIZEOF(xRectangle))
void
XRenderFillRectangles (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
_Xconst XRectangle *rectangles,
int n_rects)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderFillRectanglesReq *req;
long len;
int n;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
while (n_rects)
{
GetReq(RenderFillRectangles, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderFillRectangles;
req->op = op;
req->dst = dst;
req->color.red = color->red;
req->color.green = color->green;
req->color.blue = color->blue;
req->color.alpha = color->alpha;
n = n_rects;
len = ((long)n) << 1;
if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length))
{
n = (dpy->max_request_size - req->length) >> 1;
len = ((long)n) << 1;
}
SetReqLen(req, len, len);
len <<= 2; /* watch out for macros... */
Data16 (dpy, (short *) rectangles, len);
n_rects -= n;
rectangles += n;
}
UnlockDisplay(dpy);
SyncHandle();
}
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
XFilters *
XRenderQueryFilters (Display *dpy, Drawable drawable)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
XRenderInfo *xri;
xRenderQueryFiltersReq *req;
xRenderQueryFiltersReply rep;
XFilters *filters;
char *name;
char len;
int i;
long nbytes, nbytesAlias, nbytesName;
if (!RenderHasExtension (info))
return 0;
if (!XRenderQueryFormats (dpy))
return 0;
xri = info->info;
if (xri->minor_version < 6)
return 0;
LockDisplay (dpy);
GetReq (RenderQueryFilters, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderQueryFilters;
req->drawable = drawable;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
/*
* Compute total number of bytes for filter names
*/
nbytes = (long)rep.length << 2;
nbytesAlias = rep.numAliases * 2;
if (rep.numAliases & 1)
nbytesAlias += 2;
nbytesName = nbytes - nbytesAlias;
/*
* Allocate one giant block for the whole data structure
*/
filters = Xmalloc (sizeof (XFilters) +
rep.numFilters * sizeof (char *) +
rep.numAliases * sizeof (short) +
nbytesName);
if (!filters)
{
_XEatData (dpy, (unsigned long) rep.length << 2);
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
/*
* Layout:
* XFilters
* numFilters char * pointers to filter names
* numAliases short alias values
* nbytesName char strings
*/
filters->nfilter = rep.numFilters;
filters->nalias = rep.numAliases;
filters->filter = (char **) (filters + 1);
filters->alias = (short *) (filters->filter + rep.numFilters);
name = (char *) (filters->alias + rep.numAliases);
/*
* Read the filter aliases
*/
_XRead16Pad (dpy, filters->alias, 2 * rep.numAliases);
/*
* Read the filter names
*/
for (i = 0; i < rep.numFilters; i++)
{
int l;
_XRead (dpy, &len, 1);
l = len & 0xff;
filters->filter[i] = name;
_XRead (dpy, name, l);
name[l] = '\0';
name += l + 1;
}
i = name - (char *) (filters->alias + rep.numAliases);
if (i & 3)
_XEatData (dpy, 4 - (i & 3));
UnlockDisplay (dpy);
return filters;
}
void
XRenderSetPictureFilter (Display *dpy,
Picture picture,
char *filter,
XFixed *params,
int nparams)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderSetPictureFilterReq *req;
int nbytes = strlen (filter);
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderSetPictureFilter, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderSetPictureFilter;
req->picture = picture;
req->nbytes = nbytes;
req->length += ((nbytes + 3) >> 2) + nparams;
Data (dpy, filter, nbytes);
Data32 (dpy, params, nparams << 2);
UnlockDisplay(dpy);
SyncHandle();
}
XCOMM $XFree86: xc/lib/Xrender/Imakefile,v 1.10tsi Exp $
#ifdef UseInstalled
XCOMM Allow for builds against old installed bits. Note that this requires
XCOMM that additional files be copied (or linked) into this directory. See
XCOMM NONSTANDARD_HEADERS below.
#ifndef SharedLibXrender
#define SharedLibXrender YES
#endif
#ifndef NormalLibXrender
#define NormalLibXrender (!SharedLibXrender | ForceNormalLib)
#endif
#ifndef DebugLibXrender
#define DebugLibXrender NO
#endif
#ifndef ProfileLibXrender
#define ProfileLibXrender NO
#endif
#undef SharedXrenderRev
#define SharedXrenderRev 1.1
SOXRENDERREV = SharedXrenderRev
#undef LinkBuildLibrary
#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\
RemoveFile($(BUILDLIBDIR)/lib) @@\
cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .
#undef _LinkBuildLibrary
#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
#undef LinkBuildLibraryMaybe
#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\
@if doit; then (set -x; \ @@\
RemoveFile($(BUILDLIBDIR)/lib); \ @@\
cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi
#undef LdPreLibs
#define LdPreLibs -L$(BUILDLIBDIR) LdPreLib XLdPreLibs
LDPRELIBS = LdPreLibs
NONSTANDARD_HEADERS = extutil.h region.h render.h renderproto.h
all:: $(NONSTANDARD_HEADERS)
includes depend:: $(NONSTANDARD_HEADERS)
$(NONSTANDARD_HEADERS):
@echo Header file $@ is missing.
#ifdef XBuildIncDir
RENDERCLEANDIR = $(BUILDINCROOT)
#else
RENDERCLEANDIR = $(BUILDINCDIR)
#endif
clean::
$(RM) -r $(RENDERCLEANDIR)
#endif
#define DoNormalLib NormalLibXrender
#define DoSharedLib SharedLibXrender
#define DoDebugLib DebugLibXrender
#define DoProfileLib ProfileLibXrender
#define LibName NX_Xrender
#define SoRev SOXRENDERREV
#ifdef XBuildIncDir
#define IncSubdir nx-X11
#define IncSubSubdir extensions
RENDERINCDIR = $(BUILDINCDIR)
#else
#define IncSubdir extensions
RENDERINCDIR = $(BUILDINCROOT)
#endif
#include <Threads.tmpl>
#ifdef SharedXrenderReqs
REQUIREDLIBS = SharedXrenderReqs
#endif
#if Malloc0ReturnsNull
ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
DEFINES = $(ALLOC_DEFINES)
#ifdef UseInstalled
INCLUDES = -I$(RENDERINCDIR) -I$(INCROOT)/X11 -I$(INCROOT)/X11/extensions
#else
INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC)
#endif
SRCS = Xrender.c \
AddTrap.c \
Color.c \
Composite.c \
Cursor.c \
Glyph.c \
Picture.c \
FillRect.c \
FillRects.c \
Filter.c \
Poly.c \
Trap.c \
Tri.c
OBJS = Xrender.o \
AddTrap.o \
Color.o \
Composite.o \
Cursor.o \
Glyph.o \
Picture.o \
FillRect.o \
FillRects.o \
Filter.o \
Poly.o \
Trap.o \
Tri.o
LINTLIBS = $(LINTXLIB)
HEADERS = Xrender.h $(NONSTANDARD_HEADERS)
SUBSTVARS=prefix="$(PROJECTROOT)" \
exec_prefix="$(BINDIR)" \
libdir="$(USRLIBDIR)" \
includedir="$(INCROOT)" \
VERSION="0.8.4" \
X_REQUIRES="" \
RENDER_CFLAGS="" \
X_NON_PKG_CFLAGS="" \
X_NON_PKG_LIBS="-lX11 -lXext"
#include <Library.tmpl>
DependTarget()
#ifndef clean
/* Generate a distclean target */
distclean:: clean
RemoveFile(Makefile)
#endif
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
typedef struct _Edge Edge;
struct _Edge {
XLineFixed edge;
XFixed current_x;
Bool clockWise;
Edge *next, *prev;
};
static int
CompareEdge (const void *o1, const void *o2)
{
const Edge *e1 = o1, *e2 = o2;
return e1->edge.p1.y - e2->edge.p1.y;
}
static XFixed
XRenderComputeX (XLineFixed *line, XFixed y)
{
XFixed dx = line->p2.x - line->p1.x;
double ex = (double) (y - line->p1.y) * (double) dx;
XFixed dy = line->p2.y - line->p1.y;
return (XFixed) line->p1.x + (XFixed) (ex / dy);
}
static double
XRenderComputeInverseSlope (XLineFixed *l)
{
return (XFixedToDouble (l->p2.x - l->p1.x) /
XFixedToDouble (l->p2.y - l->p1.y));
}
static double
XRenderComputeXIntercept (XLineFixed *l, double inverse_slope)
{
return XFixedToDouble (l->p1.x) - inverse_slope * XFixedToDouble (l->p1.y);
}
static XFixed
XRenderComputeIntersect (XLineFixed *l1, XLineFixed *l2)
{
/*
* x = m1y + b1
* x = m2y + b2
* m1y + b1 = m2y + b2
* y * (m1 - m2) = b2 - b1
* y = (b2 - b1) / (m1 - m2)
*/
double m1 = XRenderComputeInverseSlope (l1);
double b1 = XRenderComputeXIntercept (l1, m1);
double m2 = XRenderComputeInverseSlope (l2);
double b2 = XRenderComputeXIntercept (l2, m2);
return XDoubleToFixed ((b2 - b1) / (m1 - m2));
}
static int
XRenderComputeTrapezoids (Edge *edges,
int nedges,
int winding,
XTrapezoid *traps)
{
int ntraps = 0;
int inactive;
Edge *active;
Edge *e, *en, *next;
XFixed y, next_y, intersect;
qsort (edges, nedges, sizeof (Edge), CompareEdge);
y = edges[0].edge.p1.y;
active = 0;
inactive = 0;
while (active || inactive < nedges)
{
/* insert new active edges into list */
while (inactive < nedges)
{
e = &edges[inactive];
if (e->edge.p1.y > y)
break;
/* move this edge into the active list */
inactive++;
e->next = active;
e->prev = 0;
if (active)
active->prev = e;
active = e;
}
/* compute x coordinates along this group */
for (e = active; e; e = e->next)
e->current_x = XRenderComputeX (&e->edge, y);
/* sort active list */
for (e = active; e; e = next)
{
next = e->next;
/*
* Find one later in the list that belongs before the
* current one
*/
for (en = next; en; en = en->next)
{
if (en->current_x < e->current_x ||
(en->current_x == e->current_x &&
en->edge.p2.x < e->edge.p2.x))
{
/*
* insert en before e
*
* extract en
*/
en->prev->next = en->next;
if (en->next)
en->next->prev = en->prev;
/*
* insert en
*/
if (e->prev)
e->prev->next = en;
else
active = en;
en->prev = e->prev;
e->prev = en;
en->next = e;
/*
* start over at en
*/
next = en;
break;
}
}
}
#if 0
printf ("y: %6.3g:", y / 65536.0);
for (e = active; e; e = e->next)
{
printf (" %6.3g", e->current_x / 65536.0);
}
printf ("\n");
#endif
/* find next inflection point */
next_y = active->edge.p2.y;
for (e = active; e; e = en)
{
if (e->edge.p2.y < next_y)
next_y = e->edge.p2.y;
en = e->next;
/* check intersect */
if (en && e->edge.p2.x > en->edge.p2.x)
{
intersect = XRenderComputeIntersect (&e->edge, &e->next->edge);
/* make sure this point is below the actual intersection */
intersect = intersect + 1;
if (intersect < next_y)
next_y = intersect;
}
}
/* check next inactive point */
if (inactive < nedges && edges[inactive].edge.p1.y < next_y)
next_y = edges[inactive].edge.p1.y;
/* walk the list generating trapezoids */
for (e = active; e && (en = e->next); e = en->next)
{
traps->top = y;
traps->bottom = next_y;
traps->left = e->edge;
traps->right = en->edge;
traps++;
ntraps++;
}
y = next_y;
/* delete inactive edges from list */
for (e = active; e; e = next)
{
next = e->next;
if (e->edge.p2.y <= y)
{
if (e->prev)
e->prev->next = e->next;
else
active = e->next;
if (e->next)
e->next->prev = e->prev;
}
}
}
return ntraps;
}
void
XRenderCompositeDoublePoly (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XPointDouble *fpoints,
int npoints,
int winding)
{
Edge *edges;
XTrapezoid *traps;
int i, nedges, ntraps;
XFixed x, y, prevx = 0, prevy = 0, firstx = 0, firsty = 0;
XFixed top = 0, bottom = 0; /* GCCism */
edges = (Edge *) Xmalloc (npoints * sizeof (Edge) +
(npoints * npoints * sizeof (XTrapezoid)));
if (!edges)
return;
traps = (XTrapezoid *) (edges + npoints);
nedges = 0;
for (i = 0; i <= npoints; i++)
{
if (i == npoints)
{
x = firstx;
y = firsty;
}
else
{
x = XDoubleToFixed (fpoints[i].x);
y = XDoubleToFixed (fpoints[i].y);
}
if (i)
{
if (y < top)
top = y;
else if (y > bottom)
bottom = y;
if (prevy < y)
{
edges[nedges].edge.p1.x = prevx;
edges[nedges].edge.p1.y = prevy;
edges[nedges].edge.p2.x = x;
edges[nedges].edge.p2.y = y;
edges[nedges].clockWise = True;
nedges++;
}
else if (prevy > y)
{
edges[nedges].edge.p1.x = x;
edges[nedges].edge.p1.y = y;
edges[nedges].edge.p2.x = prevx;
edges[nedges].edge.p2.y = prevy;
edges[nedges].clockWise = False;
nedges++;
}
/* drop horizontal edges */
}
else
{
top = y;
bottom = y;
firstx = x;
firsty = y;
}
prevx = x;
prevy = y;
}
ntraps = XRenderComputeTrapezoids (edges, nedges, winding, traps);
/* XXX adjust xSrc/xDst */
XRenderCompositeTrapezoids (dpy, op, src, dst, maskFormat, xSrc, ySrc, traps, ntraps);
Xfree (edges);
}
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
void
XRenderCompositeTrapezoids (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTrapezoid *traps,
int ntrap)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderTrapezoidsReq *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(RenderTrapezoids, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderTrapezoids;
req->op = (CARD8) op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : 0;
req->xSrc = xSrc;
req->ySrc = ySrc;
n = ntrap;
len = ((long) n) * (SIZEOF (xTrapezoid) >> 2);
if (len > (max_req - req->length)) {
n = (max_req - req->length) / (SIZEOF (xTrapezoid) >> 2);
len = ((long)n) * (SIZEOF (xTrapezoid) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) traps, len);
ntrap -= n;
traps += n;
}
UnlockDisplay(dpy);
SyncHandle();
}
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
void
XRenderCompositeTriangles (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTriangle *triangles,
int ntriangle)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderTrianglesReq *req;
int n;
long len;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
while (ntriangle)
{
GetReq(RenderTriangles, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderTriangles;
req->op = (CARD8) op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : 0;
req->xSrc = xSrc;
req->ySrc = ySrc;
n = ntriangle;
len = ((long) n) * (SIZEOF (xTriangle) >> 2);
if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) {
n = (dpy->max_request_size - req->length) / (SIZEOF (xTriangle) >> 2);
len = ((long)n) * (SIZEOF (xTriangle) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) triangles, len);
ntriangle -= n;
triangles += n;
}
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeTriStrip (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XPointFixed *points,
int npoint)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderTriStripReq *req;
int n;
long len;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
while (npoint > 2)
{
GetReq(RenderTriStrip, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderTriStrip;
req->op = (CARD8) op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : 0;
req->xSrc = xSrc;
req->ySrc = ySrc;
n = npoint;
len = ((long) n) * (SIZEOF (xPointFixed) >> 2);
if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) {
n = (dpy->max_request_size - req->length) / (SIZEOF (xPointFixed) >> 2);
len = ((long)n) * (SIZEOF (xPointFixed) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) points, len);
npoint -= (n - 2);
points += (n - 2);
}
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeTriFan (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XPointFixed *points,
int npoint)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
_Xconst XPointFixed *first = points;
xPointFixed *p;
xRenderTriFanReq *req;
int n;
long len;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
points++;
npoint--;
while (npoint > 1)
{
GetReqExtra(RenderTriFan, SIZEOF (xPointFixed), req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderTriFan;
req->op = (CARD8) op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : 0;
req->xSrc = xSrc;
req->ySrc = ySrc;
p = (xPointFixed *) (req + 1);
p->x = first->x;
p->y = first->y;
n = npoint;
len = ((long) n) * (SIZEOF (xPointFixed) >> 2);
if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) {
n = (dpy->max_request_size - req->length) / (SIZEOF (xPointFixed) >> 2);
len = ((long)n) * (SIZEOF (xPointFixed) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) points, len);
npoint -= (n - 1);
points += (n - 1);
}
UnlockDisplay(dpy);
SyncHandle();
}
LIBRARY Xrender
VERSION LIBRARY_VERSION
EXPORTS
XRenderParseColor
XRenderComposite
XRenderCreateCursor
XRenderFillRectangle
XRenderFillRectangles
XRenderQueryFilters
XRenderSetPictureFilter
XRenderAddGlyphs
XRenderCompositeString16
XRenderCompositeString32
XRenderCompositeString8
XRenderCompositeText16
XRenderCompositeText32
XRenderCompositeText8
XRenderCreateGlyphSet
XRenderFreeGlyphSet
XRenderFreeGlyphs
XRenderReferenceGlyphSet
XRenderChangePicture
XRenderCreatePicture
XRenderFreePicture
XRenderSetPictureClipRectangles
XRenderSetPictureClipRegion
XRenderSetPictureTransform
XRenderCompositeDoublePoly
XRenderCompositeTrapezoids
XRenderCompositeTriFan
XRenderCompositeTriStrip
XRenderCompositeTriangles
XRenderFindDisplay
XRenderFindFormat
XRenderFindStandardFormat
XRenderFindVisualFormat
XRenderQueryExtension
XRenderQueryFormats
XRenderQuerySubpixelOrder
XRenderQueryVersion
XRenderSetSubpixelOrder
#ifdef __UNIXOS2__
XRenderCreateAnimCursor
#endif
......@@ -402,17 +402,17 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS)
#if defined(SunArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
-lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lXfixes -lXfont \
-lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes -lXfont \
-L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXdmcp \
`pkg-config --libs libxml-2.0`
#elif defined(cygwinArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \
-lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lXcomposite -lXfixes -lXfont \
-lXcomp -lXcompext -lXrender -lX11 -lNX_Xext -lXcomposite -lXfixes -lXfont \
-L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \
`pkg-config --libs libxml-2.0`
#else
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
-lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \
-lXcomp -lXcompext -lXcompshad -lXrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \
-L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXinerama -lXdmcp \
`pkg-config --libs libxml-2.0`
#endif
......
......@@ -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.
......@@ -25,13 +25,10 @@
#ifndef _XRENDERINT_H_
#define _XRENDERINT_H_
#include "config.h"
#define NEED_EVENTS
#define NEED_REPLIES
#include <nx-X11/Xlibint.h>
#include <nx-X11/Xutil.h>
#include <nx-X11/extensions/renderproto.h>
#include "Xrender.h"
#include "X11/include/Xrender_nxagent.h"
typedef struct {
Visual *visual;
......@@ -101,9 +98,14 @@ XRenderFindDisplay (Display *dpy);
/*
* Xlib uses long for 32-bit values. Xrender uses int. This
* matters on alpha. Note that this macro assumes that int is 32 bits.
* matters on alpha. Note that this macro assumes that int is 32 bits
* except on WORD64 machines where it is 64 bits.
*/
#ifdef WORD64
#define DataInt32(dpy,d,len) Data32(dpy,(long *) (d),len)
#else
#define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len)
#endif
#endif /* _XRENDERINT_H_ */
......@@ -39,7 +39,7 @@
#define Atom XlibAtom
#define Pixmap XlibPixmap
#include "../../../../lib/Xrender/Xrenderint.h"
#include "NXrenderint.h"
#undef Atom
#undef Pixmap
......@@ -2273,8 +2273,6 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi,
normalizedImages = images;
}
XRenderCleanGlyphs(gi, nglyphs, normalizedImages, glyphDepths[glyphSet -> fdepth], nxagentDisplay);
XRenderAddGlyphs(nxagentDisplay,
glyphSet -> remoteID,
gids,
......
......@@ -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.
......@@ -25,18 +25,12 @@
#ifndef _XRENDER_H_
#define _XRENDER_H_
#define NX_CLEANUP
#include <nx-X11/extensions/render.h>
#include <nx-X11/Xlib.h>
#include <nx-X11/Xfuncproto.h>
#include <nx-X11/Xosdefs.h>
#include <nx-X11/Xutil.h>
#ifdef NX_CLEANUP
#include "renderproto.h"
#endif
#include <nx-X11/extensions/render.h>
typedef struct {
short red;
......@@ -226,7 +220,7 @@ XRenderFindFormat (Display *dpy,
unsigned long mask,
_Xconst XRenderPictFormat *templ,
int count);
#define PictStandardARGB32 0
#define PictStandardRGB24 1
#define PictStandardA8 2
......@@ -302,16 +296,6 @@ XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing);
void
XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset);
#ifdef NX_CLEANUP
void XRenderCleanGlyphs (xGlyphInfo *gi,
int nglyphs,
CARD8 *images,
int depth,
Display *dpy);
#endif /* #ifdef NX_CLEANUP */
void
XRenderAddGlyphs (Display *dpy,
GlyphSet glyphset,
......@@ -484,7 +468,7 @@ XRenderCompositeDoublePoly (Display *dpy,
int npoints,
int winding);
Status
XRenderParseColor(Display *dpy,
XRenderParseColor(Display *dpy,
char *spec,
XRenderColor *def);
......@@ -500,7 +484,7 @@ XRenderQueryFilters (Display *dpy, Drawable drawable);
void
XRenderSetPictureFilter (Display *dpy,
Picture picture,
char *filter,
const char *filter,
XFixed *params,
int nparams);
......
......@@ -236,40 +236,10 @@ The NX_Xext library contains a handful of X11 extensions:
- X Extended Visual Information extension (XEvi)
- X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf)
%package -n libNX_Xrender-devel
Group: Development/Libraries
Summary: Development files for the NX Render Extension library
Requires: libNX_Xrender1%{?_isa} = %{version}-%{release}
Requires: libNX_X11-devel%{?_isa} = %{version}-%{release}
Requires: nx-proto-devel%{?_isa} = %{version}-%{release}
%description -n libNX_Xrender-devel
NX is a software suite which implements very efficient compression of
the X11 protocol. This increases performance when using X
applications over a network, especially a slow one.
The Xrender library is designed as a lightweight library interface to
the Render extension.
This package contains all necessary include files and libraries
needed to develop applications that require these.
%package -n libNX_Xrender1
Group: System Environment/Libraries
Summary: NX Rendering Extension library
Requires: %{name}%{?_isa} >= 3.5.0.29
Obsoletes: libNX_Xrender
%description -n libNX_Xrender1
NX is a software suite which implements very efficient compression of
the X11 protocol. This increases performance when using X
applications over a network, especially a slow one.
The Xrender library is designed as a lightweight library interface to
the Render extension.
%package -n libXcomp-devel
Group: Development/Libraries
......@@ -366,7 +336,6 @@ Summary: Include files and libraries for NX development
Requires: libNX_X11-devel%{?_isa} = %{version}-%{release}
Requires: libNX_Xau-devel%{?_isa} = %{version}-%{release}
Requires: libNX_Xext-devel%{?_isa} = %{version}-%{release}
Requires: libNX_Xrender-devel%{?_isa} = %{version}-%{release}
Requires: nx-proto-devel%{?_isa} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
......@@ -538,7 +507,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
%post -n libNX_X11-6 -p /sbin/ldconfig
%post -n libNX_Xau6 -p /sbin/ldconfig
%post -n libNX_Xext6 -p /sbin/ldconfig
%post -n libNX_Xrender1 -p /sbin/ldconfig
%post -n libXcomp3 -p /sbin/ldconfig
%post -n libXcompext3 -p /sbin/ldconfig
%post -n libXcompshad3 -p /sbin/ldconfig
......@@ -546,7 +514,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
%postun -n libNX_X11-6 -p /sbin/ldconfig
%postun -n libNX_Xau6 -p /sbin/ldconfig
%postun -n libNX_Xext6 -p /sbin/ldconfig
%postun -n libNX_Xrender1 -p /sbin/ldconfig
%postun -n libXcomp3 -p /sbin/ldconfig
%postun -n libXcompext3 -p /sbin/ldconfig
%postun -n libXcompshad3 -p /sbin/ldconfig
......@@ -623,15 +590,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
%defattr(-,root,root)
%{_libdir}/libNX_Xext.so.6*
%files -n libNX_Xrender-devel
%defattr(-,root,root)
%{_libdir}/libNX_Xrender.so
%{_includedir}/nx-X11/extensions/Xrender.h
%files -n libNX_Xrender1
%defattr(-,root,root)
%{_libdir}/libNX_Xrender.so.1*
%files -n libXcomp-devel
%defattr(-,root,root)
%_libdir/libXcomp.so
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment