aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render/glyph.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-25 15:19:41 +0200
committermarha <marha@users.sourceforge.net>2012-05-25 15:19:41 +0200
commiteef864d36de97903007f04fad9fa43afe297745b (patch)
tree28dd3cae5f699b493e4d72e7e7d468a5a2cae7f4 /xorg-server/render/glyph.c
parentf543ceaca6820260f15a4eff86938214cf43c7d2 (diff)
downloadvcxsrv-eef864d36de97903007f04fad9fa43afe297745b.tar.gz
vcxsrv-eef864d36de97903007f04fad9fa43afe297745b.tar.bz2
vcxsrv-eef864d36de97903007f04fad9fa43afe297745b.zip
fontconfig xserver xkeyboard-config pixman git update 2012
Diffstat (limited to 'xorg-server/render/glyph.c')
-rw-r--r--xorg-server/render/glyph.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/xorg-server/render/glyph.c b/xorg-server/render/glyph.c
index a143e9eb5..acb573fe6 100644
--- a/xorg-server/render/glyph.c
+++ b/xorg-server/render/glyph.c
@@ -90,7 +90,6 @@ GlyphUninit(ScreenPtr pScreen)
PictureScreenPtr ps = GetPictureScreen(pScreen);
GlyphPtr glyph;
int fdepth, i;
- int scrno = pScreen->myNum;
for (fdepth = 0; fdepth < GlyphFormatNum; fdepth++) {
if (!globalGlyphs[fdepth].hashSet)
@@ -99,9 +98,9 @@ GlyphUninit(ScreenPtr pScreen)
for (i = 0; i < globalGlyphs[fdepth].hashSet->size; i++) {
glyph = globalGlyphs[fdepth].table[i].glyph;
if (glyph && glyph != DeletedGlyph) {
- if (GlyphPicture(glyph)[scrno]) {
- FreePicture((pointer) GlyphPicture(glyph)[scrno], 0);
- GlyphPicture(glyph)[scrno] = NULL;
+ if (GetGlyphPicture(glyph, pScreen)) {
+ FreePicture((pointer) GetGlyphPicture(glyph, pScreen), 0);
+ SetGlyphPicture(glyph, pScreen, NULL);
}
(*ps->UnrealizeGlyph) (pScreen, glyph);
}
@@ -239,8 +238,8 @@ FreeGlyphPicture(GlyphPtr glyph)
for (i = 0; i < screenInfo.numScreens; i++) {
ScreenPtr pScreen = screenInfo.screens[i];
- if (GlyphPicture(glyph)[i])
- FreePicture((pointer) GlyphPicture(glyph)[i], 0);
+ if (GetGlyphPicture(glyph, pScreen))
+ FreePicture((pointer) GetGlyphPicture(glyph, pScreen), 0);
ps = GetPictureScreenIfSet(pScreen);
if (ps)
@@ -363,11 +362,12 @@ AllocateGlyph(xGlyphInfo * gi, int fdepth)
dixInitPrivates(glyph, (char *) glyph + head_size, PRIVATE_GLYPH);
for (i = 0; i < screenInfo.numScreens; i++) {
- GlyphPicture(glyph)[i] = NULL;
- ps = GetPictureScreenIfSet(screenInfo.screens[i]);
+ ScreenPtr pScreen = screenInfo.screens[i];
+ SetGlyphPicture(glyph, pScreen, NULL);
+ ps = GetPictureScreenIfSet(pScreen);
if (ps) {
- if (!(*ps->RealizeGlyph) (screenInfo.screens[i], glyph))
+ if (!(*ps->RealizeGlyph) (pScreen, glyph))
goto bail;
}
}
@@ -638,7 +638,7 @@ miGlyphs(CARD8 op,
n = list->len;
while (n--) {
glyph = *glyphs++;
- pPicture = GlyphPicture(glyph)[pScreen->myNum];
+ pPicture = GetGlyphPicture(glyph, pScreen);
if (pPicture) {
if (maskFormat) {
@@ -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;
+}