[PATCH 3/8] render: Hide/unexport some implementation details
Aaron Plattner
aplattner at nvidia.com
Mon Jun 8 17:58:08 PDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 06/02/2015 11:15 AM, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax at redhat.com>
I think these are all fine.
Reviewed-by: Aaron Plattner <aplattner at nvidia.com>
- -- Aaron
> --- render/glyph.c | 10 +++++----- render/glyphstr.h | 36
> ++++++++++-------------------------- render/mipict.c | 16
> ++++++++-------- render/mipict.h | 36
> ------------------------------------ render/picture.c | 24
> ++++++++++++------------ render/picture.h | 6 +++---
> render/picturestr.h | 50
> +++++--------------------------------------------- 7 files changed,
> 43 insertions(+), 135 deletions(-)
>
> diff --git a/render/glyph.c b/render/glyph.c index f3310db..ea865af
> 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 2df055d..2f51bd2
> 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 GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id);
>
> -extern _X_EXPORT GlyphPtr AllocateGlyph(xGlyphInfo * gi, int
> format); +extern GlyphPtr AllocateGlyph(xGlyphInfo * gi, int
> format);
>
> -extern _X_EXPORT Bool - AllocateGlyphHash(GlyphHashPtr hash,
> GlyphHashSetPtr hashSet); - -extern _X_EXPORT Bool -
> ResizeGlyphHash(GlyphHashPtr hash, CARD32 change, Bool global); -
> -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
> 2571fda..4b85512 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
> 23ce9e8..3241be4 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 60517a4..506aec4 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 66c85c5..087e54d 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
> 177f87b..33baef9 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);
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJVdjogAAoJEBvvPYQBpohhJ1oP/jFaeLNGUlv3byh0FokknUdz
G2mRSJ5uzQs4kOMEDCRxpMpbXc2eqzsjMX14KrZChQDyp684DeHS6Y8YlkRHN5hp
AwMlVQrAcURyJ2t0kTkGs2p5XXmlHZAWlL7XDEWBjWQNtukFFmC6Tkb1pltzq7fs
wqg1hZ7mLpRnbeKVfL/LCcAiwmHYgjVETj/75G6Wz95Q7zN6L4w5P/jxHPev4fap
aKWUzsLiw//58LVQyzOoRfbHmJckwy03K3H6FmDvYPpUqL9o40xfdxoo8G/Yqq1b
hrUlUVpDP1SUHFh3pMk256+iUCbZIw3o7nFwfBTzpdr12nf8vcm1cvw9X3sUhLZj
rtcqdvLuByDwbgLbOdG5tqmUTWzivfsRXP/mjpqc0H8l27q1/+FyWS7kgnPViicp
kL9DqvpQEBxnGtpbdGJtSg48VkRIf7TUTKMjtTVu4FzYeLkeTQ20B88zoo+XgtPa
qJY42908hVJtvEnWLnk8iA5HIg0kDbGxKCCB7OQFE8umsUy2q1LKZomkqtd3dFBX
xTp1ZCTFhEEpHSyl8sY1rAPzbpz7Mfq5WAZxAzruqDCiqITjT88bWSJERa5SLk2p
w6pBvSl0Oz5L3gSFzj2oNTAW3iod3cKt9fRmeKLCc7A7A5VhuycZS+e3wG7zJzND
begJVDYW9IABx44vnkfp
=60Sl
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
More information about the xorg-devel
mailing list