summaryrefslogtreecommitdiff
authorDave Airlie <airlied@redhat.com>2012-05-05 08:38:28 (GMT)
committer Dave Airlie <airlied@redhat.com>2012-05-21 11:59:20 (GMT)
commita45e1d6cc6f2a5f31ed737294351cfa251caa030 (patch) (side-by-side diff)
tree7b9b5ccdbab2212eb989d82f1f8d76f02d0ef019
parent41151f88a62f01b00c1912822b8b430df1eb307e (diff)
downloadxserver-a45e1d6cc6f2a5f31ed737294351cfa251caa030.zip
xserver-a45e1d6cc6f2a5f31ed737294351cfa251caa030.tar.gz
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>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--render/glyph.c10
-rw-r--r--render/glyphstr.h6
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_ */