aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/render
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2016-06-25 01:35:40 +0200
committerMihai Moldovan <ionic@ionic.de>2016-06-25 01:35:40 +0200
commit975511c875674f097bbd2be33fa947a48d8c77c6 (patch)
tree207bba2c48054f551f19ed5aa89b9dd9616b8c60 /nx-X11/programs/Xserver/render
parent9df153668423af868d0df739188a772fbc3356c6 (diff)
parenta5befd4e20813910022ed771cb599f15bbf4664d (diff)
downloadnx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.tar.gz
nx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.tar.bz2
nx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.zip
Merge branch 'sunweaver-pr/hw-nxagent-drop-duplicate-Xserver-code_disable-Xserver-code-and-include-in-nxagent' into arctica-3.6.x
Attributes GH PR #120: https://github.com/ArcticaProject/nx-libs/pull/120
Diffstat (limited to 'nx-X11/programs/Xserver/render')
-rw-r--r--nx-X11/programs/Xserver/render/Imakefile39
-rw-r--r--nx-X11/programs/Xserver/render/glyph.c7
-rw-r--r--nx-X11/programs/Xserver/render/glyphstr.h8
-rw-r--r--nx-X11/programs/Xserver/render/miglyph.c2
-rw-r--r--nx-X11/programs/Xserver/render/mitrap.c2
-rw-r--r--nx-X11/programs/Xserver/render/picture.c11
-rw-r--r--nx-X11/programs/Xserver/render/picturestr.h4
-rw-r--r--nx-X11/programs/Xserver/render/render.c28
8 files changed, 87 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/render/Imakefile b/nx-X11/programs/Xserver/render/Imakefile
index ff272ecbd..2d918458b 100644
--- a/nx-X11/programs/Xserver/render/Imakefile
+++ b/nx-X11/programs/Xserver/render/Imakefile
@@ -1,33 +1,51 @@
XCOMM $XFree86: xc/programs/Xserver/render/Imakefile,v 1.10 2002/11/23 02:38:15 keithp Exp $
+
+NULL =
+
#include <Server.tmpl>
+#if (!(defined(NXAgentServer) && NXAgentServer))
+NXAGENT_SKIP_SRCS = \
+ glyph.c \
+ miglyph.c \
+ mitrap.c \
+ picture.c \
+ render.c \
+ $(NULL)
+NXAGENT_SKIP_OBJS = \
+ glyph.o \
+ miglyph.o \
+ mitrap.o \
+ picture.o \
+ render.o \
+ $(NULL)
+#else
+ DEFINES = -DNXAGENT_SERVER
+#endif
+
SRCS = animcur.c \
filter.c \
glyph.c \
matrix.c \
- miglyph.c \
miindex.c \
mipict.c \
mirect.c \
- mitrap.c \
mitri.c \
- picture.c \
- render.c \
- renderedge.c
+ renderedge.c \
+ $(NXAGENT_SKIP_SRCS) \
+ $(NULL)
OBJS = animcur.o \
filter.o \
glyph.o \
matrix.o \
- miglyph.o \
miindex.o \
mipict.o \
mirect.o \
- mitrap.o \
mitri.o \
- picture.o \
- render.o \
- renderedge.o
+ renderedge.o \
+ $(NXAGENT_SKIP_OBJS) \
+ $(NULL)
INCLUDES = -I. -I../include -I../mi \
-I../fb -I../hw/kdrive -I$(EXTINCSRC) -I$(XINCLUDESRC) \
@@ -46,4 +64,3 @@ InstallDriverSDKNonExecFile(glyphstr.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(mipict.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(picture.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(picturestr.h,$(DRIVERSDKINCLUDEDIR))
-
diff --git a/nx-X11/programs/Xserver/render/glyph.c b/nx-X11/programs/Xserver/render/glyph.c
index f15b199b5..854a9069d 100644
--- a/nx-X11/programs/Xserver/render/glyph.c
+++ b/nx-X11/programs/Xserver/render/glyph.c
@@ -268,6 +268,7 @@ FreeGlyph (GlyphPtr glyph, int format)
}
}
+#ifndef NXAGENT_SERVER
void
AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id)
{
@@ -301,6 +302,7 @@ AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id)
gr->signature = id;
CheckDuplicates (&globalGlyphs[glyphSet->fdepth], "AddGlyph bottom");
}
+#endif /* NXAGENT_SERVER */
Bool
DeleteGlyph (GlyphSetPtr glyphSet, Glyph id)
@@ -320,6 +322,7 @@ DeleteGlyph (GlyphSetPtr glyphSet, Glyph id)
return FALSE;
}
+#ifndef NXAGENT_SERVER
GlyphPtr
FindGlyph (GlyphSetPtr glyphSet, Glyph id)
{
@@ -330,6 +333,7 @@ FindGlyph (GlyphSetPtr glyphSet, Glyph id)
glyph = 0;
return glyph;
}
+#endif /* NXAGENT_SERVER */
GlyphPtr
AllocateGlyph (xGlyphInfo *gi, int fdepth)
@@ -363,6 +367,8 @@ AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet)
return TRUE;
}
+
+#ifndef NXAGENT_SERVER
Bool
ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global)
{
@@ -405,6 +411,7 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global)
CheckDuplicates (hash, "ResizeGlyphHash bottom");
return TRUE;
}
+#endif /* NXAGENT_SERVER */
Bool
ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change)
diff --git a/nx-X11/programs/Xserver/render/glyphstr.h b/nx-X11/programs/Xserver/render/glyphstr.h
index f27a73fbb..d0c14919c 100644
--- a/nx-X11/programs/Xserver/render/glyphstr.h
+++ b/nx-X11/programs/Xserver/render/glyphstr.h
@@ -44,10 +44,14 @@ typedef struct _Glyph {
/* bits follow */
} GlyphRec, *GlyphPtr;
+#ifdef NXAGENT_SERVER
+#include "../hw/nxagent/NXglyphstr_GlyphRef.h"
+#else
typedef struct _GlyphRef {
CARD32 signature;
GlyphPtr glyph;
} GlyphRefRec, *GlyphRefPtr;
+#endif /* NXAGENT_SERVER */
#define DeletedGlyph ((GlyphPtr) 1)
@@ -63,6 +67,9 @@ typedef struct _GlyphHash {
CARD32 tableEntries;
} GlyphHashRec, *GlyphHashPtr;
+#ifdef NXAGENT_SERVER
+#include "../hw/nxagent/NXglyphstr_GlyphSet.h"
+#else
typedef struct _GlyphSet {
CARD32 refcnt;
PictFormatPtr format;
@@ -71,6 +78,7 @@ typedef struct _GlyphSet {
int maxPrivate;
void **devPrivates;
} GlyphSetRec, *GlyphSetPtr;
+#endif /* NXAGENT_SERVER */
#define GlyphSetGetPrivate(pGlyphSet,n) \
((n) > (pGlyphSet)->maxPrivate ? \
diff --git a/nx-X11/programs/Xserver/render/miglyph.c b/nx-X11/programs/Xserver/render/miglyph.c
index 8b046bd46..f169c3bb7 100644
--- a/nx-X11/programs/Xserver/render/miglyph.c
+++ b/nx-X11/programs/Xserver/render/miglyph.c
@@ -89,6 +89,7 @@ miGlyphExtents (int nlist,
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
+#ifndef NXAGENT_SERVER
void
miGlyphs (CARD8 op,
PicturePtr pSrc,
@@ -241,3 +242,4 @@ miGlyphs (CARD8 op,
(*pScreen->DestroyPixmap) (pMaskPixmap);
}
}
+#endif
diff --git a/nx-X11/programs/Xserver/render/mitrap.c b/nx-X11/programs/Xserver/render/mitrap.c
index be1712420..96f1159a4 100644
--- a/nx-X11/programs/Xserver/render/mitrap.c
+++ b/nx-X11/programs/Xserver/render/mitrap.c
@@ -128,6 +128,7 @@ miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box)
}
}
+#ifndef NXAGENT_SERVER
void
miTrapezoids (CARD8 op,
PicturePtr pSrc,
@@ -188,3 +189,4 @@ miTrapezoids (CARD8 op,
miTrapezoids (op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, traps);
}
}
+#endif
diff --git a/nx-X11/programs/Xserver/render/picture.c b/nx-X11/programs/Xserver/render/picture.c
index 3c43abd67..a29a9568c 100644
--- a/nx-X11/programs/Xserver/render/picture.c
+++ b/nx-X11/programs/Xserver/render/picture.c
@@ -40,7 +40,10 @@
#include "dixstruct.h"
#include "gcstruct.h"
#include "servermd.h"
+
+#ifndef NXAGENT_SERVER
#include "picturestr.h"
+#endif
int PictureScreenPrivateIndex = -1;
int PictureWindowPrivateIndex;
@@ -212,6 +215,7 @@ addFormat (FormatInitRec formats[256],
#define Mask(n) ((n) == 32 ? 0xffffffff : ((1 << (n))-1))
+#ifndef NXAGENT_SERVER
PictFormatPtr
PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
{
@@ -431,6 +435,7 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
*nformatp = nformats;
return pFormats;
}
+#endif
static VisualPtr
PictureFindVisual (ScreenPtr pScreen, VisualID visual)
@@ -767,6 +772,7 @@ SetPictureToDefaults (PicturePtr pPicture)
pPicture->pSourcePict = 0;
}
+#ifndef NXAGENT_SERVER
PicturePtr
AllocatePicture (ScreenPtr pScreen)
{
@@ -847,6 +853,7 @@ CreatePicture (Picture pid,
}
return pPicture;
}
+#endif
static CARD32 xRenderColorToCard32(xRenderColor c)
{
@@ -969,6 +976,7 @@ static void initGradient(SourcePictPtr pGradient, int stopCount,
initGradientColorTable(pGradient, error);
}
+#ifndef NXAGENT_SERVER
static PicturePtr createSourcePicture(void)
{
PicturePtr pPicture;
@@ -1002,6 +1010,7 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error)
pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color);
return pPicture;
}
+#endif
PicturePtr
CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2,
@@ -1592,6 +1601,7 @@ ValidatePicture(PicturePtr pPicture)
ValidateOnePicture (pPicture->alphaMap);
}
+#ifndef NXAGENT_SERVER
int
FreePicture (void * value,
XID pid)
@@ -1641,6 +1651,7 @@ FreePicture (void * value,
}
return Success;
}
+#endif
int
FreePictFormat (void * pPictFormat,
diff --git a/nx-X11/programs/Xserver/render/picturestr.h b/nx-X11/programs/Xserver/render/picturestr.h
index 4969f6cab..27c36dc9c 100644
--- a/nx-X11/programs/Xserver/render/picturestr.h
+++ b/nx-X11/programs/Xserver/render/picturestr.h
@@ -65,10 +65,14 @@ typedef struct pixman_transform PictTransform, *PictTransformPtr;
#define SourcePictTypeRadial 2
#define SourcePictTypeConical 3
+#ifdef NXAGENT_SERVER
+#include "../hw/nxagent/NXpicturestr_PictSolidFill.h"
+#else
typedef struct _PictSolidFill {
unsigned int type;
CARD32 color;
} PictSolidFill, *PictSolidFillPtr;
+#endif /* NXAGENT_SERVER */
typedef struct _PictGradientStop {
xFixed x;
diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c
index b165cf549..c73ff8305 100644
--- a/nx-X11/programs/Xserver/render/render.c
+++ b/nx-X11/programs/Xserver/render/render.c
@@ -275,6 +275,7 @@ RenderResetProc (ExtensionEntry *extEntry)
ResetGlyphSetPrivateIndex();
}
+#ifndef NXAGENT_SERVER
static int
ProcRenderQueryVersion (ClientPtr client)
{
@@ -303,6 +304,7 @@ ProcRenderQueryVersion (ClientPtr client)
WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep);
return (client->noClientException);
}
+#endif /* NXAGENT_SERVER */
#if 0
static int
@@ -341,6 +343,7 @@ findVisual (ScreenPtr pScreen, VisualID vid)
extern char *ConnectionInfo;
+#ifndef NXAGENT_SERVER
static int
ProcRenderQueryPictFormats (ClientPtr client)
{
@@ -550,6 +553,7 @@ ProcRenderQueryPictFormats (ClientPtr client)
xfree (reply);
return client->noClientException;
}
+#endif /* NXAGENT_SERVER */
static int
ProcRenderQueryPictIndexValues (ClientPtr client)
@@ -621,6 +625,7 @@ ProcRenderQueryDithers (ClientPtr client)
return BadImplementation;
}
+#ifndef NXAGENT_SERVER
static int
ProcRenderCreatePicture (ClientPtr client)
{
@@ -710,6 +715,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
else
return(result);
}
+#endif /* NXAGENT_SERVER */
static int
ProcRenderFreePicture (ClientPtr client)
@@ -737,6 +743,7 @@ PictOpValid (CARD8 op)
return FALSE;
}
+#ifndef NXAGENT_SERVER
static int
ProcRenderComposite (ClientPtr client)
{
@@ -774,6 +781,7 @@ ProcRenderComposite (ClientPtr client)
stuff->height);
return Success;
}
+#endif /* NXAGENT_SERVER */
static int
ProcRenderScale (ClientPtr client)
@@ -781,6 +789,7 @@ ProcRenderScale (ClientPtr client)
return BadImplementation;
}
+#ifndef NXAGENT_SERVER
static int
ProcRenderTrapezoids (ClientPtr client)
{
@@ -827,6 +836,7 @@ ProcRenderTrapezoids (ClientPtr client)
ntraps, (xTrapezoid *) &stuff[1]);
return client->noClientException;
}
+#endif /* NXAGENT_SERVER */
static int
ProcRenderTriangles (ClientPtr client)
@@ -987,6 +997,7 @@ ProcRenderTransform (ClientPtr client)
return BadImplementation;
}
+#ifndef NXAGENT_SERVER
static int
ProcRenderCreateGlyphSet (ClientPtr client)
{
@@ -1060,10 +1071,12 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
return BadAlloc;
return client->noClientException;
}
+#endif /* NXAGENT_SERVER */
#define NLOCALDELTA 64
#define NLOCALGLYPH 256
+#ifndef NXAGENT_SERVER
static int
ProcRenderFreeGlyphSet (ClientPtr client)
{
@@ -1083,6 +1096,7 @@ ProcRenderFreeGlyphSet (ClientPtr client)
FreeResource (stuff->glyphset, RT_NONE);
return client->noClientException;
}
+#endif /* NXAGENT_SERVER */
typedef struct _GlyphNew {
Glyph id;
@@ -1096,7 +1110,7 @@ ProcRenderAddGlyphs (ClientPtr client)
REQUEST(xRenderAddGlyphsReq);
GlyphNewRec glyphsLocal[NLOCALGLYPH];
GlyphNewPtr glyphsBase, glyphs;
- GlyphPtr glyph;
+ GlyphPtr glyph = NULL;
int remain, nglyphs;
CARD32 *gids;
xGlyphInfo *gi;
@@ -1199,6 +1213,7 @@ ProcRenderAddGlyphsFromPicture (ClientPtr client)
return BadImplementation;
}
+#ifndef NXAGENT_SERVER
static int
ProcRenderFreeGlyphs (ClientPtr client)
{
@@ -1454,6 +1469,7 @@ ProcRenderFillRectangles (ClientPtr client)
return client->noClientException;
}
+#endif /* NXAGENT_SERVER */
static void
SetBit (unsigned char *line, int x, int bit)
@@ -1481,6 +1497,7 @@ static CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = {
#define DITHER_SIZE ((sizeof orderedDither / sizeof orderedDither[0][0]) + 1)
+#ifndef NXAGENT_SERVER
static int
ProcRenderCreateCursor (ClientPtr client)
{
@@ -1694,6 +1711,7 @@ ProcRenderSetPictureTransform (ClientPtr client)
else
return(result);
}
+#endif /* NXAGENT_SERVER */
static int
ProcRenderQueryFilters (ClientPtr client)
@@ -1804,6 +1822,7 @@ ProcRenderQueryFilters (ClientPtr client)
return(client->noClientException);
}
+#ifndef NXAGENT_SERVER
static int
ProcRenderSetPictureFilter (ClientPtr client)
{
@@ -1868,6 +1887,7 @@ ProcRenderCreateAnimCursor (ClientPtr client)
return client->noClientException;
return BadAlloc;
}
+#endif /* NXAGENT_SERVER */
static int
ProcRenderAddTraps (ClientPtr client)
@@ -1892,6 +1912,7 @@ ProcRenderAddTraps (ClientPtr client)
return client->noClientException;
}
+#ifndef NXAGENT_SERVER
static int ProcRenderCreateSolidFill(ClientPtr client)
{
PicturePtr pPicture;
@@ -2011,6 +2032,7 @@ ProcRenderDispatch (ClientPtr client)
else
return BadRequest;
}
+#endif /* NXAGENT_SERVER */
static int
SProcRenderQueryVersion (ClientPtr client)
@@ -2516,13 +2538,11 @@ static void swapStops(void *stuff, int num)
{
int i, n;
CARD32 *stops;
- CARD16 *colors;
stops = (CARD32 *)(stuff);
for (i = 0; i < num; ++i) {
swapl(stops, n);
++stops;
}
- colors = (CARD16 *)(stops);
for (i = 0; i < 4*num; ++i) {
swaps(stops, n);
++stops;
@@ -2611,6 +2631,7 @@ SProcRenderCreateConicalGradient (ClientPtr client)
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
+#ifndef NXAGENT_SERVER
static int
SProcRenderDispatch (ClientPtr client)
{
@@ -2621,6 +2642,7 @@ SProcRenderDispatch (ClientPtr client)
else
return BadRequest;
}
+#endif /* NXAGENT_SERVER */
#ifdef PANORAMIX
#include "panoramiX.h"