Commit a6485587 authored by Mike Gabriel's avatar Mike Gabriel

hw/nxagent/NXrender.c: Shrink file, drop duplicate code that can identically be…

hw/nxagent/NXrender.c: Shrink file, drop duplicate code that can identically be found in render/render.c. Fixes ArcticaProject/nx-libs#37
parent 778e83a3
...@@ -9,11 +9,13 @@ NXAGENT_SKIP_SRCS = \ ...@@ -9,11 +9,13 @@ NXAGENT_SKIP_SRCS = \
miglyph.c \ miglyph.c \
mitrap.c \ mitrap.c \
picture.c \ picture.c \
render.c \
$(NULL) $(NULL)
NXAGENT_SKIP_OBJS = \ NXAGENT_SKIP_OBJS = \
miglyph.o \ miglyph.o \
mitrap.o \ mitrap.o \
picture.o \ picture.o \
render.o \
$(NULL) $(NULL)
#else #else
DEFINES = -DNXAGENT_SERVER DEFINES = -DNXAGENT_SERVER
...@@ -27,7 +29,6 @@ NXAGENT_SKIP_OBJS = \ ...@@ -27,7 +29,6 @@ NXAGENT_SKIP_OBJS = \
mipict.c \ mipict.c \
mirect.c \ mirect.c \
mitri.c \ mitri.c \
render.c \
renderedge.c \ renderedge.c \
$(NXAGENT_SKIP_SRCS) \ $(NXAGENT_SKIP_SRCS) \
$(NULL) $(NULL)
...@@ -40,7 +41,6 @@ NXAGENT_SKIP_OBJS = \ ...@@ -40,7 +41,6 @@ NXAGENT_SKIP_OBJS = \
mipict.o \ mipict.o \
mirect.o \ mirect.o \
mitri.o \ mitri.o \
render.o \
renderedge.o \ renderedge.o \
$(NXAGENT_SKIP_OBJS) \ $(NXAGENT_SKIP_OBJS) \
$(NULL) $(NULL)
......
...@@ -275,6 +275,7 @@ RenderResetProc (ExtensionEntry *extEntry) ...@@ -275,6 +275,7 @@ RenderResetProc (ExtensionEntry *extEntry)
ResetGlyphSetPrivateIndex(); ResetGlyphSetPrivateIndex();
} }
#ifndef NXAGENT_SERVER
static int static int
ProcRenderQueryVersion (ClientPtr client) ProcRenderQueryVersion (ClientPtr client)
{ {
...@@ -303,6 +304,7 @@ ProcRenderQueryVersion (ClientPtr client) ...@@ -303,6 +304,7 @@ ProcRenderQueryVersion (ClientPtr client)
WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep);
return (client->noClientException); return (client->noClientException);
} }
#endif /* NXAGENT_SERVER */
#if 0 #if 0
static int static int
...@@ -341,6 +343,7 @@ findVisual (ScreenPtr pScreen, VisualID vid) ...@@ -341,6 +343,7 @@ findVisual (ScreenPtr pScreen, VisualID vid)
extern char *ConnectionInfo; extern char *ConnectionInfo;
#ifndef NXAGENT_SERVER
static int static int
ProcRenderQueryPictFormats (ClientPtr client) ProcRenderQueryPictFormats (ClientPtr client)
{ {
...@@ -550,6 +553,7 @@ ProcRenderQueryPictFormats (ClientPtr client) ...@@ -550,6 +553,7 @@ ProcRenderQueryPictFormats (ClientPtr client)
xfree (reply); xfree (reply);
return client->noClientException; return client->noClientException;
} }
#endif /* NXAGENT_SERVER */
static int static int
ProcRenderQueryPictIndexValues (ClientPtr client) ProcRenderQueryPictIndexValues (ClientPtr client)
...@@ -621,6 +625,7 @@ ProcRenderQueryDithers (ClientPtr client) ...@@ -621,6 +625,7 @@ ProcRenderQueryDithers (ClientPtr client)
return BadImplementation; return BadImplementation;
} }
#ifndef NXAGENT_SERVER
static int static int
ProcRenderCreatePicture (ClientPtr client) ProcRenderCreatePicture (ClientPtr client)
{ {
...@@ -710,6 +715,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client) ...@@ -710,6 +715,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
else else
return(result); return(result);
} }
#endif /* NXAGENT_SERVER */
static int static int
ProcRenderFreePicture (ClientPtr client) ProcRenderFreePicture (ClientPtr client)
...@@ -737,6 +743,7 @@ PictOpValid (CARD8 op) ...@@ -737,6 +743,7 @@ PictOpValid (CARD8 op)
return FALSE; return FALSE;
} }
#ifndef NXAGENT_SERVER
static int static int
ProcRenderComposite (ClientPtr client) ProcRenderComposite (ClientPtr client)
{ {
...@@ -774,6 +781,7 @@ ProcRenderComposite (ClientPtr client) ...@@ -774,6 +781,7 @@ ProcRenderComposite (ClientPtr client)
stuff->height); stuff->height);
return Success; return Success;
} }
#endif /* NXAGENT_SERVER */
static int static int
ProcRenderScale (ClientPtr client) ProcRenderScale (ClientPtr client)
...@@ -781,6 +789,7 @@ ProcRenderScale (ClientPtr client) ...@@ -781,6 +789,7 @@ ProcRenderScale (ClientPtr client)
return BadImplementation; return BadImplementation;
} }
#ifndef NXAGENT_SERVER
static int static int
ProcRenderTrapezoids (ClientPtr client) ProcRenderTrapezoids (ClientPtr client)
{ {
...@@ -827,6 +836,7 @@ ProcRenderTrapezoids (ClientPtr client) ...@@ -827,6 +836,7 @@ ProcRenderTrapezoids (ClientPtr client)
ntraps, (xTrapezoid *) &stuff[1]); ntraps, (xTrapezoid *) &stuff[1]);
return client->noClientException; return client->noClientException;
} }
#endif /* NXAGENT_SERVER */
static int static int
ProcRenderTriangles (ClientPtr client) ProcRenderTriangles (ClientPtr client)
...@@ -987,6 +997,7 @@ ProcRenderTransform (ClientPtr client) ...@@ -987,6 +997,7 @@ ProcRenderTransform (ClientPtr client)
return BadImplementation; return BadImplementation;
} }
#ifndef NXAGENT_SERVER
static int static int
ProcRenderCreateGlyphSet (ClientPtr client) ProcRenderCreateGlyphSet (ClientPtr client)
{ {
...@@ -1060,10 +1071,12 @@ ProcRenderReferenceGlyphSet (ClientPtr client) ...@@ -1060,10 +1071,12 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
return BadAlloc; return BadAlloc;
return client->noClientException; return client->noClientException;
} }
#endif /* NXAGENT_SERVER */
#define NLOCALDELTA 64 #define NLOCALDELTA 64
#define NLOCALGLYPH 256 #define NLOCALGLYPH 256
#ifndef NXAGENT_SERVER
static int static int
ProcRenderFreeGlyphSet (ClientPtr client) ProcRenderFreeGlyphSet (ClientPtr client)
{ {
...@@ -1083,6 +1096,7 @@ ProcRenderFreeGlyphSet (ClientPtr client) ...@@ -1083,6 +1096,7 @@ ProcRenderFreeGlyphSet (ClientPtr client)
FreeResource (stuff->glyphset, RT_NONE); FreeResource (stuff->glyphset, RT_NONE);
return client->noClientException; return client->noClientException;
} }
#endif /* NXAGENT_SERVER */
typedef struct _GlyphNew { typedef struct _GlyphNew {
Glyph id; Glyph id;
...@@ -1096,7 +1110,7 @@ ProcRenderAddGlyphs (ClientPtr client) ...@@ -1096,7 +1110,7 @@ ProcRenderAddGlyphs (ClientPtr client)
REQUEST(xRenderAddGlyphsReq); REQUEST(xRenderAddGlyphsReq);
GlyphNewRec glyphsLocal[NLOCALGLYPH]; GlyphNewRec glyphsLocal[NLOCALGLYPH];
GlyphNewPtr glyphsBase, glyphs; GlyphNewPtr glyphsBase, glyphs;
GlyphPtr glyph; GlyphPtr glyph = NULL;
int remain, nglyphs; int remain, nglyphs;
CARD32 *gids; CARD32 *gids;
xGlyphInfo *gi; xGlyphInfo *gi;
...@@ -1199,6 +1213,7 @@ ProcRenderAddGlyphsFromPicture (ClientPtr client) ...@@ -1199,6 +1213,7 @@ ProcRenderAddGlyphsFromPicture (ClientPtr client)
return BadImplementation; return BadImplementation;
} }
#ifndef NXAGENT_SERVER
static int static int
ProcRenderFreeGlyphs (ClientPtr client) ProcRenderFreeGlyphs (ClientPtr client)
{ {
...@@ -1454,6 +1469,7 @@ ProcRenderFillRectangles (ClientPtr client) ...@@ -1454,6 +1469,7 @@ ProcRenderFillRectangles (ClientPtr client)
return client->noClientException; return client->noClientException;
} }
#endif /* NXAGENT_SERVER */
static void static void
SetBit (unsigned char *line, int x, int bit) SetBit (unsigned char *line, int x, int bit)
...@@ -1481,6 +1497,7 @@ static CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = { ...@@ -1481,6 +1497,7 @@ static CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = {
#define DITHER_SIZE ((sizeof orderedDither / sizeof orderedDither[0][0]) + 1) #define DITHER_SIZE ((sizeof orderedDither / sizeof orderedDither[0][0]) + 1)
#ifndef NXAGENT_SERVER
static int static int
ProcRenderCreateCursor (ClientPtr client) ProcRenderCreateCursor (ClientPtr client)
{ {
...@@ -1694,6 +1711,7 @@ ProcRenderSetPictureTransform (ClientPtr client) ...@@ -1694,6 +1711,7 @@ ProcRenderSetPictureTransform (ClientPtr client)
else else
return(result); return(result);
} }
#endif /* NXAGENT_SERVER */
static int static int
ProcRenderQueryFilters (ClientPtr client) ProcRenderQueryFilters (ClientPtr client)
...@@ -1804,6 +1822,7 @@ ProcRenderQueryFilters (ClientPtr client) ...@@ -1804,6 +1822,7 @@ ProcRenderQueryFilters (ClientPtr client)
return(client->noClientException); return(client->noClientException);
} }
#ifndef NXAGENT_SERVER
static int static int
ProcRenderSetPictureFilter (ClientPtr client) ProcRenderSetPictureFilter (ClientPtr client)
{ {
...@@ -1868,6 +1887,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) ...@@ -1868,6 +1887,7 @@ ProcRenderCreateAnimCursor (ClientPtr client)
return client->noClientException; return client->noClientException;
return BadAlloc; return BadAlloc;
} }
#endif /* NXAGENT_SERVER */
static int static int
ProcRenderAddTraps (ClientPtr client) ProcRenderAddTraps (ClientPtr client)
...@@ -1892,6 +1912,7 @@ ProcRenderAddTraps (ClientPtr client) ...@@ -1892,6 +1912,7 @@ ProcRenderAddTraps (ClientPtr client)
return client->noClientException; return client->noClientException;
} }
#ifndef NXAGENT_SERVER
static int ProcRenderCreateSolidFill(ClientPtr client) static int ProcRenderCreateSolidFill(ClientPtr client)
{ {
PicturePtr pPicture; PicturePtr pPicture;
...@@ -2011,6 +2032,7 @@ ProcRenderDispatch (ClientPtr client) ...@@ -2011,6 +2032,7 @@ ProcRenderDispatch (ClientPtr client)
else else
return BadRequest; return BadRequest;
} }
#endif /* NXAGENT_SERVER */
static int static int
SProcRenderQueryVersion (ClientPtr client) SProcRenderQueryVersion (ClientPtr client)
...@@ -2611,6 +2633,7 @@ SProcRenderCreateConicalGradient (ClientPtr client) ...@@ -2611,6 +2633,7 @@ SProcRenderCreateConicalGradient (ClientPtr client)
return (*ProcRenderVector[stuff->renderReqType]) (client); return (*ProcRenderVector[stuff->renderReqType]) (client);
} }
#ifndef NXAGENT_SERVER
static int static int
SProcRenderDispatch (ClientPtr client) SProcRenderDispatch (ClientPtr client)
{ {
...@@ -2621,6 +2644,7 @@ SProcRenderDispatch (ClientPtr client) ...@@ -2621,6 +2644,7 @@ SProcRenderDispatch (ClientPtr client)
else else
return BadRequest; return BadRequest;
} }
#endif /* NXAGENT_SERVER */
#ifdef PANORAMIX #ifdef PANORAMIX
#include "panoramiX.h" #include "panoramiX.h"
......
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