diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-02-12 13:30:20 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-03-03 22:54:16 +0000 |
commit | 368055d3f16f3ca6aec3cbbb27e5548ab7f58e18 (patch) | |
tree | 341f811ff408c266483b068719f07d852b67f05f | |
parent | 6ddade2e6a843a4c0081d4a31fa303d1e2464f36 (diff) |
render: move private definitions out of public glyphstr.h
Public module API headers don't need / shouldn't to contain anything that
isn't part of the API (non-exported functions, etc).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1287>
-rw-r--r-- | exa/exa_glyphs.c | 2 | ||||
-rw-r--r-- | fb/fbpict.c | 2 | ||||
-rw-r--r-- | glamor/glamor_composite_glyphs.c | 1 | ||||
-rw-r--r-- | miext/damage/damage.c | 1 | ||||
-rw-r--r-- | render/glyph.c | 2 | ||||
-rw-r--r-- | render/glyphstr.h | 66 | ||||
-rw-r--r-- | render/glyphstr_priv.h | 63 | ||||
-rw-r--r-- | render/picture.c | 1 | ||||
-rw-r--r-- | render/picturestr.h | 1 | ||||
-rw-r--r-- | render/render.c | 2 |
10 files changed, 71 insertions, 70 deletions
diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c index 192a643cc..6b97a83b1 100644 --- a/exa/exa_glyphs.c +++ b/exa/exa_glyphs.c @@ -47,7 +47,7 @@ #include <stdlib.h> #include "exa_priv.h" - +#include "glyphstr_priv.h" #include "mipict.h" #if DEBUG_GLYPH_CACHE diff --git a/fb/fbpict.c b/fb/fbpict.c index 9797447b4..f985198fb 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -30,7 +30,7 @@ #include <string.h> #include "fb.h" - +#include "glyphstr_priv.h" #include "picturestr.h" #include "mipict.h" #include "fbpict.h" diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c index f208504dd..428303091 100644 --- a/glamor/glamor_composite_glyphs.c +++ b/glamor/glamor_composite_glyphs.c @@ -25,6 +25,7 @@ #include "glamor_priv.h" #include "glamor_transform.h" #include "glamor_transfer.h" +#include "glyphstr_priv.h" #include <mipict.h> diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 48e6af673..344d90d34 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -40,6 +40,7 @@ #include "gcstruct.h" #include "damage.h" #include "damagestr.h" +#include "glyphstr_priv.h" #define wrap(priv, real, mem, func) {\ priv->mem = real->mem; \ diff --git a/render/glyph.c b/render/glyph.c index f3ed9cf4c..3396df375 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -42,7 +42,7 @@ #include "gcstruct.h" #include "servermd.h" #include "picturestr.h" -#include "glyphstr.h" +#include "glyphstr_priv.h" #include "mipict.h" /* diff --git a/render/glyphstr.h b/render/glyphstr.h index 2f51bd244..9f6b1c410 100644 --- a/render/glyphstr.h +++ b/render/glyphstr.h @@ -25,12 +25,8 @@ #ifndef _GLYPHSTR_H_ #define _GLYPHSTR_H_ -#include <X11/extensions/renderproto.h> #include "picture.h" #include "screenint.h" -#include "regionstr.h" -#include "miscstruct.h" -#include "privates.h" #define GlyphFormat1 0 #define GlyphFormat4 1 @@ -48,41 +44,6 @@ typedef struct _Glyph { /* per-screen pixmaps follow */ } GlyphRec, *GlyphPtr; -#define GlyphPicture(glyph) ((PicturePtr *) ((glyph) + 1)) - -typedef struct _GlyphRef { - CARD32 signature; - GlyphPtr glyph; -} GlyphRefRec, *GlyphRefPtr; - -#define DeletedGlyph ((GlyphPtr) 1) - -typedef struct _GlyphHashSet { - CARD32 entries; - CARD32 size; - CARD32 rehash; -} GlyphHashSetRec, *GlyphHashSetPtr; - -typedef struct _GlyphHash { - GlyphRefPtr table; - GlyphHashSetPtr hashSet; - CARD32 tableEntries; -} GlyphHashRec, *GlyphHashPtr; - -typedef struct _GlyphSet { - CARD32 refcnt; - int fdepth; - PictFormatPtr format; - GlyphHashRec hash; - PrivateRec *devPrivates; -} GlyphSetRec, *GlyphSetPtr; - -#define GlyphSetGetPrivate(pGlyphSet,k) \ - dixLookupPrivate(&(pGlyphSet)->devPrivates, k) - -#define GlyphSetSetPrivate(pGlyphSet,k,ptr) \ - dixSetPrivate(&(pGlyphSet)->devPrivates, k, ptr) - typedef struct _GlyphList { INT16 xOff; INT16 yOff; @@ -90,33 +51,6 @@ typedef struct _GlyphList { PictFormatPtr format; } GlyphListRec, *GlyphListPtr; -extern void - GlyphUninit(ScreenPtr pScreen); - -extern GlyphPtr FindGlyphByHash(unsigned char sha1[20], int format); - -extern int -HashGlyph(xGlyphInfo * gi, - CARD8 *bits, unsigned long size, unsigned char sha1[20]); - -extern void - AddGlyph(GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id); - -extern Bool - DeleteGlyph(GlyphSetPtr glyphSet, Glyph id); - -extern GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id); - -extern GlyphPtr AllocateGlyph(xGlyphInfo * gi, int format); - -extern Bool - ResizeGlyphSet(GlyphSetPtr glyphSet, CARD32 change); - -extern GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format); - -extern int - FreeGlyphSet(void *value, XID gid); - #define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR 1 /* used for api compat */ extern _X_EXPORT PicturePtr GetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen); diff --git a/render/glyphstr_priv.h b/render/glyphstr_priv.h new file mode 100644 index 000000000..90a90fa4f --- /dev/null +++ b/render/glyphstr_priv.h @@ -0,0 +1,63 @@ +/* SPDX-License-Identifier: MIT OR X11 + * + * Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net> + * Copyright © 2000 SuSE, Inc. + */ +#ifndef _XSERVER_GLYPHSTR_PRIV_H_ +#define _XSERVER_GLYPHSTR_PRIV_H_ + +#include <X11/extensions/renderproto.h> +#include "glyphstr.h" +#include "picture.h" +#include "screenint.h" +#include "regionstr.h" +#include "miscstruct.h" +#include "privates.h" + +#define GlyphPicture(glyph) ((PicturePtr *) ((glyph) + 1)) + +typedef struct { + CARD32 signature; + GlyphPtr glyph; +} GlyphRefRec, *GlyphRefPtr; + +#define DeletedGlyph ((GlyphPtr) 1) + +typedef struct { + CARD32 entries; + CARD32 size; + CARD32 rehash; +} GlyphHashSetRec, *GlyphHashSetPtr; + +typedef struct { + GlyphRefPtr table; + GlyphHashSetPtr hashSet; + CARD32 tableEntries; +} GlyphHashRec, *GlyphHashPtr; + +typedef struct { + CARD32 refcnt; + int fdepth; + PictFormatPtr format; + GlyphHashRec hash; + PrivateRec *devPrivates; +} GlyphSetRec, *GlyphSetPtr; + +#define GlyphSetGetPrivate(pGlyphSet,k) \ + dixLookupPrivate(&(pGlyphSet)->devPrivates, k) + +#define GlyphSetSetPrivate(pGlyphSet,k,ptr) \ + dixSetPrivate(&(pGlyphSet)->devPrivates, k, ptr) + +void GlyphUninit(ScreenPtr pScreen); +GlyphPtr FindGlyphByHash(unsigned char sha1[20], int format); +int HashGlyph(xGlyphInfo * gi, CARD8 *bits, unsigned long size, unsigned char sha1[20]); +void AddGlyph(GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id); +Bool DeleteGlyph(GlyphSetPtr glyphSet, Glyph id); +GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id); +GlyphPtr AllocateGlyph(xGlyphInfo * gi, int format); +Bool ResizeGlyphSet(GlyphSetPtr glyphSet, CARD32 change); +GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format); +int FreeGlyphSet(void *value, XID gid); + +#endif /* _XSERVER_GLYPHSTR_PRIV_H_ */ diff --git a/render/picture.c b/render/picture.c index 065890cfb..495cc2955 100644 --- a/render/picture.c +++ b/render/picture.c @@ -40,6 +40,7 @@ #include "gcstruct.h" #include "servermd.h" #include "picturestr_priv.h" +#include "glyphstr_priv.h" #include "xace.h" #ifdef PANORAMIX #include "panoramiXsrv.h" diff --git a/render/picturestr.h b/render/picturestr.h index 5ebc3a132..001d37bfa 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -24,6 +24,7 @@ #ifndef _PICTURESTR_H_ #define _PICTURESTR_H_ +#include <X11/extensions/renderproto.h> #include "scrnintstr.h" #include "glyphstr.h" #include "resource.h" diff --git a/render/render.c b/render/render.c index 8ae057ce0..29c5055c6 100644 --- a/render/render.c +++ b/render/render.c @@ -42,7 +42,7 @@ #include <X11/extensions/render.h> #include <X11/extensions/renderproto.h> #include "picturestr_priv.h" -#include "glyphstr.h" +#include "glyphstr_priv.h" #include <X11/Xfuncproto.h> #include "cursorstr.h" #include "xace.h" |