summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-05-30 16:19:08 -0400
committerAdam Jackson <ajax@redhat.com>2015-07-08 16:40:57 -0400
commit70b402be2626d4f4afb02b6f5baa543262548bd7 (patch)
tree0a256583f7a9a77559d92be804bcc680b54e4761
parenta1c80bb7d5871e1c5ee21fc650834858054103bf (diff)
render: Hide/unexport some implementation details
Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--render/glyph.c10
-rw-r--r--render/glyphstr.h36
-rw-r--r--render/mipict.c16
-rw-r--r--render/mipict.h36
-rw-r--r--render/picture.c24
-rw-r--r--render/picture.h6
-rw-r--r--render/picturestr.h50
7 files changed, 43 insertions, 135 deletions
diff --git a/render/glyph.c b/render/glyph.c
index f3310db12..ea865af58 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -106,7 +106,7 @@ GlyphUninit(ScreenPtr pScreen)
}
}
-GlyphHashSetPtr
+static GlyphHashSetPtr
FindGlyphHashSet(CARD32 filled)
{
int i;
@@ -117,7 +117,7 @@ FindGlyphHashSet(CARD32 filled)
return 0;
}
-GlyphRefPtr
+static GlyphRefPtr
FindGlyphRef(GlyphHashPtr hash,
CARD32 signature, Bool match, unsigned char sha1[20])
{
@@ -245,7 +245,7 @@ FreeGlyphPicture(GlyphPtr glyph)
}
}
-void
+static void
FreeGlyph(GlyphPtr glyph, int format)
{
CheckDuplicates(&globalGlyphs[format], "FreeGlyph");
@@ -383,7 +383,7 @@ AllocateGlyph(xGlyphInfo * gi, int fdepth)
return 0;
}
-Bool
+static Bool
AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet)
{
hash->table = calloc(hashSet->size, sizeof(GlyphRefRec));
@@ -394,7 +394,7 @@ AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet)
return TRUE;
}
-Bool
+static Bool
ResizeGlyphHash(GlyphHashPtr hash, CARD32 change, Bool global)
{
CARD32 tableEntries;
diff --git a/render/glyphstr.h b/render/glyphstr.h
index 2df055dfd..2f51bd244 100644
--- a/render/glyphstr.h
+++ b/render/glyphstr.h
@@ -90,47 +90,31 @@ typedef struct _GlyphList {
PictFormatPtr format;
} GlyphListRec, *GlyphListPtr;
-extern _X_EXPORT void
+extern void
GlyphUninit(ScreenPtr pScreen);
-extern _X_EXPORT GlyphHashSetPtr FindGlyphHashSet(CARD32 filled);
-
-extern _X_EXPORT GlyphRefPtr
-FindGlyphRef(GlyphHashPtr hash,
- CARD32 signature, Bool match, unsigned char sha1[20]);
-
-extern _X_EXPORT GlyphPtr FindGlyphByHash(unsigned char sha1[20], int format);
-
-extern _X_EXPORT int
+extern GlyphPtr FindGlyphByHash(unsigned char sha1[20], int format);
+extern int
HashGlyph(xGlyphInfo * gi,
CARD8 *bits, unsigned long size, unsigned char sha1[20]);
-extern _X_EXPORT void
- FreeGlyph(GlyphPtr glyph, int format);
-
-extern _X_EXPORT void
+extern void
AddGlyph(GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
-extern _X_EXPORT Bool
+extern Bool
DeleteGlyph(GlyphSetPtr glyphSet, Glyph id);
-extern _X_EXPORT GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id);
-
-extern _X_EXPORT GlyphPtr AllocateGlyph(xGlyphInfo * gi, int format);
-
-extern _X_EXPORT Bool
- AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet);
+extern GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id);
-extern _X_EXPORT Bool
- ResizeGlyphHash(GlyphHashPtr hash, CARD32 change, Bool global);
+extern GlyphPtr AllocateGlyph(xGlyphInfo * gi, int format);
-extern _X_EXPORT Bool
+extern Bool
ResizeGlyphSet(GlyphSetPtr glyphSet, CARD32 change);
-extern _X_EXPORT GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format);
+extern GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format);
-extern _X_EXPORT int
+extern int
FreeGlyphSet(void *value, XID gid);
#define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR 1 /* used for api compat */
diff --git a/render/mipict.c b/render/mipict.c
index 2571fda17..4b855122e 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -46,7 +46,7 @@ miDestroyPicture(PicturePtr pPicture)
RegionDestroy(pPicture->pCompositeClip);
}
-void
+static void
miDestroyPictureClip(PicturePtr pPicture)
{
if (pPicture->clientClip)
@@ -54,7 +54,7 @@ miDestroyPictureClip(PicturePtr pPicture)
pPicture->clientClip = NULL;
}
-int
+static int
miChangePictureClip(PicturePtr pPicture, int type, void *value, int n)
{
ScreenPtr pScreen = pPicture->pDrawable->pScreen;
@@ -88,13 +88,13 @@ miChangePictureClip(PicturePtr pPicture, int type, void *value, int n)
return Success;
}
-void
+static void
miChangePicture(PicturePtr pPicture, Mask mask)
{
return;
}
-void
+static void
miValidatePicture(PicturePtr pPicture, Mask mask)
{
DrawablePtr pDrawable = pPicture->pDrawable;
@@ -211,13 +211,13 @@ miValidatePicture(PicturePtr pPicture, Mask mask)
}
}
-int
+static int
miChangePictureTransform(PicturePtr pPicture, PictTransform * transform)
{
return Success;
}
-int
+static int
miChangePictureFilter(PicturePtr pPicture,
int filter, xFixed * params, int nparams)
{
@@ -499,7 +499,7 @@ miRenderPixelToColor(PictFormatPtr format, CARD32 pixel, xRenderColor * color)
}
}
-void
+static void
miTriStrip(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
@@ -523,7 +523,7 @@ miTriStrip(CARD8 op,
free(tris);
}
-void
+static void
miTriFan(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
diff --git a/render/mipict.h b/render/mipict.h
index 23ce9e8f6..3241be4b9 100644
--- a/render/mipict.h
+++ b/render/mipict.h
@@ -54,26 +54,6 @@ extern _X_EXPORT void
miDestroyPicture(PicturePtr pPicture);
extern _X_EXPORT void
- miDestroyPictureClip(PicturePtr pPicture);
-
-extern _X_EXPORT int
- miChangePictureClip(PicturePtr pPicture, int type, void *value, int n);
-
-extern _X_EXPORT void
- miChangePicture(PicturePtr pPicture, Mask mask);
-
-extern _X_EXPORT void
- miValidatePicture(PicturePtr pPicture, Mask mask);
-
-extern _X_EXPORT int
- miChangePictureTransform(PicturePtr pPicture, PictTransform * transform);
-
-extern _X_EXPORT int
-
-miChangePictureFilter(PicturePtr pPicture,
- int filter, xFixed * params, int nparams);
-
-extern _X_EXPORT void
miCompositeSourceValidate(PicturePtr pPicture);
extern _X_EXPORT Bool
@@ -122,22 +102,6 @@ miCompositeRects(CARD8 op,
xRenderColor * color, int nRect, xRectangle *rects);
extern _X_EXPORT void
-
-miTriStrip(CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
-
-extern _X_EXPORT void
-
-miTriFan(CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
-
-extern _X_EXPORT void
miTrapezoidBounds(int ntrap, xTrapezoid * traps, BoxPtr box);
extern _X_EXPORT void
diff --git a/render/picture.c b/render/picture.c
index 60517a4ee..506aec419 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -61,7 +61,7 @@ PictureWindowFormat(WindowPtr pWindow)
WindowGetVisual(pWindow));
}
-Bool
+static Bool
PictureDestroyWindow(WindowPtr pWindow)
{
ScreenPtr pScreen = pWindow->drawable.pScreen;
@@ -82,7 +82,7 @@ PictureDestroyWindow(WindowPtr pWindow)
return ret;
}
-Bool
+static Bool
PictureCloseScreen(ScreenPtr pScreen)
{
PictureScreenPtr ps = GetPictureScreen(pScreen);
@@ -102,7 +102,7 @@ PictureCloseScreen(ScreenPtr pScreen)
return ret;
}
-void
+static void
PictureStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef)
{
ScreenPtr pScreen = pColormap->pScreen;
@@ -163,7 +163,7 @@ addFormat(FormatInitRec formats[256], int nformat, CARD32 format, CARD8 depth)
#define Mask(n) ((1 << (n)) - 1)
-PictFormatPtr
+static PictFormatPtr
PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp)
{
int nformats, f;
@@ -439,7 +439,7 @@ PictureFindVisual(ScreenPtr pScreen, VisualID visual)
return 0;
}
-Bool
+static Bool
PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format)
{
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
@@ -625,6 +625,12 @@ GetPictureBytes(void *value, XID id, ResourceSizePtr size)
}
}
+static int
+FreePictFormat(void *pPictFormat, XID pid)
+{
+ return Success;
+}
+
Bool
PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats)
{
@@ -724,7 +730,7 @@ PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats)
return TRUE;
}
-void
+static void
SetPictureToDefaults(PicturePtr pPicture)
{
pPicture->refcnt = 1;
@@ -1430,12 +1436,6 @@ FreePicture(void *value, XID pid)
return Success;
}
-int
-FreePictFormat(void *pPictFormat, XID pid)
-{
- return Success;
-}
-
/**
* ReduceCompositeOp is used to choose simpler ops for cases where alpha
* channels are always one and so math on the alpha channel per pixel becomes
diff --git a/render/picture.h b/render/picture.h
index 66c85c56f..087e54d7a 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -169,11 +169,11 @@ typedef enum _PictFormatShort {
#define PictureCmapPolicyColor 3
#define PictureCmapPolicyAll 4
-extern _X_EXPORT int PictureCmapPolicy;
+extern int PictureCmapPolicy;
-extern _X_EXPORT int PictureParseCmapPolicy(const char *name);
+extern int PictureParseCmapPolicy(const char *name);
-extern _X_EXPORT int RenderErrBase;
+extern int RenderErrBase;
/* Fixed point updates from Carl Worth, USC, Information Sciences Institute */
diff --git a/render/picturestr.h b/render/picturestr.h
index 177f87b80..33baef9bf 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -344,16 +344,14 @@ typedef struct _PictureScreen {
} PictureScreenRec, *PictureScreenPtr;
extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
-
#define PictureScreenPrivateKey (&PictureScreenPrivateKeyRec)
extern _X_EXPORT DevPrivateKeyRec PictureWindowPrivateKeyRec;
-
#define PictureWindowPrivateKey (&PictureWindowPrivateKeyRec)
-extern _X_EXPORT RESTYPE PictureType;
-extern _X_EXPORT RESTYPE PictFormatType;
-extern _X_EXPORT RESTYPE GlyphSetType;
+extern RESTYPE PictureType;
+extern RESTYPE PictFormatType;
+extern RESTYPE GlyphSetType;
#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
#define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL)
@@ -380,27 +378,12 @@ extern _X_EXPORT PictFormatPtr
PictureWindowFormat(WindowPtr pWindow);
extern _X_EXPORT Bool
- PictureDestroyWindow(WindowPtr pWindow);
-
-extern _X_EXPORT Bool
- PictureCloseScreen(ScreenPtr pScreen);
-
-extern _X_EXPORT void
- PictureStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef);
-
-extern _X_EXPORT Bool
- PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format);
-
-extern _X_EXPORT Bool
PictureSetSubpixelOrder(ScreenPtr pScreen, int subpixel);
extern _X_EXPORT int
PictureGetSubpixelOrder(ScreenPtr pScreen);
extern _X_EXPORT PictFormatPtr
-PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp);
-
-extern _X_EXPORT PictFormatPtr
PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual);
extern _X_EXPORT PictFormatPtr
@@ -415,14 +398,12 @@ extern _X_EXPORT int
extern _X_EXPORT char *PictureGetFilterName(int id);
extern _X_EXPORT int
-
PictureAddFilter(ScreenPtr pScreen,
const char *filter,
PictFilterValidateParamsProcPtr ValidateParams,
int width, int height);
extern _X_EXPORT Bool
-
PictureSetFilterAlias(ScreenPtr pScreen, const char *filter, const char *alias);
extern _X_EXPORT Bool
@@ -435,21 +416,16 @@ extern _X_EXPORT PictFilterPtr
PictureFindFilter(ScreenPtr pScreen, char *name, int len);
extern _X_EXPORT int
-
SetPicturePictFilter(PicturePtr pPicture, PictFilterPtr pFilter,
xFixed * params, int nparams);
extern _X_EXPORT int
-
SetPictureFilter(PicturePtr pPicture, char *name, int len,
xFixed * params, int nparams);
extern _X_EXPORT Bool
PictureFinishInit(void);
-extern _X_EXPORT void
- SetPictureToDefaults(PicturePtr pPicture);
-
extern _X_EXPORT PicturePtr
CreatePicture(Picture pid,
DrawablePtr pDrawable,
@@ -457,7 +433,6 @@ CreatePicture(Picture pid,
Mask mask, XID *list, ClientPtr client, int *error);
extern _X_EXPORT int
-
ChangePicture(PicturePtr pPicture,
Mask vmask, XID *vlist, DevUnion *ulist, ClientPtr client);
@@ -467,7 +442,6 @@ SetPictureClipRects(PicturePtr pPicture,
int xOrigin, int yOrigin, int nRect, xRectangle *rects);
extern _X_EXPORT int
-
SetPictureClipRegion(PicturePtr pPicture,
int xOrigin, int yOrigin, RegionPtr pRegion);
@@ -480,11 +454,7 @@ extern _X_EXPORT void
extern _X_EXPORT int
FreePicture(void *pPicture, XID pid);
-extern _X_EXPORT int
- FreePictFormat(void *pPictFormat, XID pid);
-
extern _X_EXPORT void
-
CompositePicture(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -496,7 +466,6 @@ CompositePicture(CARD8 op,
INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
extern _X_EXPORT void
-
CompositeGlyphs(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
@@ -505,13 +474,11 @@ CompositeGlyphs(CARD8 op,
INT16 ySrc, int nlist, GlyphListPtr lists, GlyphPtr * glyphs);
extern _X_EXPORT void
-
CompositeRects(CARD8 op,
PicturePtr pDst,
xRenderColor * color, int nRect, xRectangle *rects);
extern _X_EXPORT void
-
CompositeTrapezoids(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
@@ -519,7 +486,6 @@ CompositeTrapezoids(CARD8 op,
INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps);
extern _X_EXPORT void
-
CompositeTriangles(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
@@ -528,7 +494,6 @@ CompositeTriangles(CARD8 op,
INT16 ySrc, int ntriangles, xTriangle * triangles);
extern _X_EXPORT void
-
CompositeTriStrip(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
@@ -536,7 +501,6 @@ CompositeTriStrip(CARD8 op,
INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
extern _X_EXPORT void
-
CompositeTriFan(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
@@ -547,12 +511,10 @@ Bool
AnimCurInit(ScreenPtr pScreen);
int
-
AnimCursorCreate(CursorPtr *cursors, CARD32 *deltas, int ncursor,
CursorPtr *ppCursor, ClientPtr client, XID cid);
extern _X_EXPORT void
-
AddTraps(PicturePtr pPicture,
INT16 xOff, INT16 yOff, int ntraps, xTrap * traps);
@@ -583,8 +545,8 @@ CreateConicalGradientPicture(Picture pid,
xFixed * stops, xRenderColor * colors, int *error);
#ifdef PANORAMIX
-extern _X_EXPORT void PanoramiXRenderInit(void);
-extern _X_EXPORT void PanoramiXRenderReset(void);
+extern void PanoramiXRenderInit(void);
+extern void PanoramiXRenderReset(void);
#endif
/*
@@ -592,12 +554,10 @@ extern _X_EXPORT void PanoramiXRenderReset(void);
*/
extern _X_EXPORT void
-
PictTransform_from_xRenderTransform(PictTransformPtr pict,
xRenderTransform * render);
extern _X_EXPORT void
-
xRenderTransform_from_PictTransform(xRenderTransform * render,
PictTransformPtr pict);