Commit 0c29f81f authored by Mike Gabriel's avatar Mike Gabriel

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

hw/nxagent/NXpicture.c: Shrink file, drop duplicate code that can identically be found in render/picture.c.
parent 809fed64
...@@ -8,10 +8,12 @@ NULL = ...@@ -8,10 +8,12 @@ NULL =
NXAGENT_SKIP_SRCS = \ NXAGENT_SKIP_SRCS = \
miglyph.c \ miglyph.c \
mitrap.c \ mitrap.c \
picture.c \
$(NULL) $(NULL)
NXAGENT_SKIP_OBJS = \ NXAGENT_SKIP_OBJS = \
miglyph.o \ miglyph.o \
mitrap.o \ mitrap.o \
picture.o \
$(NULL) $(NULL)
#endif #endif
...@@ -23,7 +25,6 @@ NXAGENT_SKIP_OBJS = \ ...@@ -23,7 +25,6 @@ NXAGENT_SKIP_OBJS = \
mipict.c \ mipict.c \
mirect.c \ mirect.c \
mitri.c \ mitri.c \
picture.c \
render.c \ render.c \
renderedge.c \ renderedge.c \
$(NXAGENT_SKIP_SRCS) \ $(NXAGENT_SKIP_SRCS) \
...@@ -37,7 +38,6 @@ NXAGENT_SKIP_OBJS = \ ...@@ -37,7 +38,6 @@ NXAGENT_SKIP_OBJS = \
mipict.o \ mipict.o \
mirect.o \ mirect.o \
mitri.o \ mitri.o \
picture.o \
render.o \ render.o \
renderedge.o \ renderedge.o \
$(NXAGENT_SKIP_OBJS) \ $(NXAGENT_SKIP_OBJS) \
......
...@@ -40,7 +40,10 @@ ...@@ -40,7 +40,10 @@
#include "dixstruct.h" #include "dixstruct.h"
#include "gcstruct.h" #include "gcstruct.h"
#include "servermd.h" #include "servermd.h"
#ifndef NXAGENT_SERVER
#include "picturestr.h" #include "picturestr.h"
#endif
int PictureScreenPrivateIndex = -1; int PictureScreenPrivateIndex = -1;
int PictureWindowPrivateIndex; int PictureWindowPrivateIndex;
...@@ -212,6 +215,7 @@ addFormat (FormatInitRec formats[256], ...@@ -212,6 +215,7 @@ addFormat (FormatInitRec formats[256],
#define Mask(n) ((n) == 32 ? 0xffffffff : ((1 << (n))-1)) #define Mask(n) ((n) == 32 ? 0xffffffff : ((1 << (n))-1))
#ifndef NXAGENT_SERVER
PictFormatPtr PictFormatPtr
PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
{ {
...@@ -431,6 +435,7 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) ...@@ -431,6 +435,7 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
*nformatp = nformats; *nformatp = nformats;
return pFormats; return pFormats;
} }
#endif
static VisualPtr static VisualPtr
PictureFindVisual (ScreenPtr pScreen, VisualID visual) PictureFindVisual (ScreenPtr pScreen, VisualID visual)
...@@ -767,6 +772,7 @@ SetPictureToDefaults (PicturePtr pPicture) ...@@ -767,6 +772,7 @@ SetPictureToDefaults (PicturePtr pPicture)
pPicture->pSourcePict = 0; pPicture->pSourcePict = 0;
} }
#ifndef NXAGENT_SERVER
PicturePtr PicturePtr
AllocatePicture (ScreenPtr pScreen) AllocatePicture (ScreenPtr pScreen)
{ {
...@@ -847,6 +853,7 @@ CreatePicture (Picture pid, ...@@ -847,6 +853,7 @@ CreatePicture (Picture pid,
} }
return pPicture; return pPicture;
} }
#endif
static CARD32 xRenderColorToCard32(xRenderColor c) static CARD32 xRenderColorToCard32(xRenderColor c)
{ {
...@@ -969,6 +976,7 @@ static void initGradient(SourcePictPtr pGradient, int stopCount, ...@@ -969,6 +976,7 @@ static void initGradient(SourcePictPtr pGradient, int stopCount,
initGradientColorTable(pGradient, error); initGradientColorTable(pGradient, error);
} }
#ifndef NXAGENT_SERVER
static PicturePtr createSourcePicture(void) static PicturePtr createSourcePicture(void)
{ {
PicturePtr pPicture; PicturePtr pPicture;
...@@ -1002,6 +1010,7 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error) ...@@ -1002,6 +1010,7 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error)
pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color); pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color);
return pPicture; return pPicture;
} }
#endif
PicturePtr PicturePtr
CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2, CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2,
...@@ -1592,6 +1601,7 @@ ValidatePicture(PicturePtr pPicture) ...@@ -1592,6 +1601,7 @@ ValidatePicture(PicturePtr pPicture)
ValidateOnePicture (pPicture->alphaMap); ValidateOnePicture (pPicture->alphaMap);
} }
#ifndef NXAGENT_SERVER
int int
FreePicture (void * value, FreePicture (void * value,
XID pid) XID pid)
...@@ -1641,6 +1651,7 @@ FreePicture (void * value, ...@@ -1641,6 +1651,7 @@ FreePicture (void * value,
} }
return Success; return Success;
} }
#endif
int int
FreePictFormat (void * pPictFormat, FreePictFormat (void * pPictFormat,
......
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