From: Dave Airlie <airl...@redhat.com> This is a new API to stop the drivers directly looking up the glyph pictures in a global array. It provides a define GLYPH_HAS_GET_GLYPH_PICTURE to allow drivers to work in a compat way.
Signed-off-by: Dave Airlie <airl...@redhat.com> --- render/glyph.c | 10 ++++++++++ render/glyphstr.h | 6 ++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/render/glyph.c b/render/glyph.c index a143e9e..a9dddaf 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -684,3 +684,13 @@ miGlyphs(CARD8 op, (*pScreen->DestroyPixmap) (pMaskPixmap); } } + +PicturePtr GetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen) +{ + return GlyphPicture(glyph)[pScreen->myNum]; +} + +void SetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen, PicturePtr picture) +{ + GlyphPicture(glyph)[pScreen->myNum] = picture; +} diff --git a/render/glyphstr.h b/render/glyphstr.h index cbc4751..7d178be 100644 --- a/render/glyphstr.h +++ b/render/glyphstr.h @@ -133,4 +133,10 @@ extern _X_EXPORT GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format); extern _X_EXPORT int FreeGlyphSet(pointer value, XID gid); +#define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR 1 /* used for api compat */ +extern _X_EXPORT PicturePtr + GetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen); +extern _X_EXPORT void + SetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen, PicturePtr picture); + #endif /* _GLYPHSTR_H_ */ -- 1.7.7.6 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel