From 0c29f81f1bbd3c507c847ce4460d316478083213 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 9 Apr 2016 00:36:40 +0200 Subject: hw/nxagent/NXpicture.c: Shrink file, drop duplicate code that can identically be found in render/picture.c. --- nx-X11/programs/Xserver/render/Imakefile | 4 ++-- nx-X11/programs/Xserver/render/picture.c | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver/render') diff --git a/nx-X11/programs/Xserver/render/Imakefile b/nx-X11/programs/Xserver/render/Imakefile index 0685ef3f6..5db244d6d 100644 --- a/nx-X11/programs/Xserver/render/Imakefile +++ b/nx-X11/programs/Xserver/render/Imakefile @@ -8,10 +8,12 @@ NULL = NXAGENT_SKIP_SRCS = \ miglyph.c \ mitrap.c \ + picture.c \ $(NULL) NXAGENT_SKIP_OBJS = \ miglyph.o \ mitrap.o \ + picture.o \ $(NULL) #endif @@ -23,7 +25,6 @@ NXAGENT_SKIP_OBJS = \ mipict.c \ mirect.c \ mitri.c \ - picture.c \ render.c \ renderedge.c \ $(NXAGENT_SKIP_SRCS) \ @@ -37,7 +38,6 @@ NXAGENT_SKIP_OBJS = \ mipict.o \ mirect.o \ mitri.o \ - picture.o \ render.o \ renderedge.o \ $(NXAGENT_SKIP_OBJS) \ 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, -- cgit v1.2.3