render: add GetGlyphPicture accessor.

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_GLYPH_PICTURE_ACCESSOR for
drivers to work in a compat way.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2012-05-05 09:38:28 +01:00
parent 41151f88a6
commit a45e1d6cc6
2 changed files with 16 additions and 0 deletions

View File

@ -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;
}

View File

@ -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_ */