diff options
author | marha <marha@users.sourceforge.net> | 2012-05-25 15:31:52 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-05-25 15:31:52 +0200 |
commit | e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66 (patch) | |
tree | 9e46ba338311cb6658589a7767ebcb7f525eb369 /xorg-server/render | |
parent | aebbd673a0fb4d5e9ae4e8e690b29fb364376875 (diff) | |
parent | eef864d36de97903007f04fad9fa43afe297745b (diff) | |
download | vcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.tar.gz vcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.tar.bz2 vcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'xorg-server/render')
-rw-r--r-- | xorg-server/render/glyph.c | 30 | ||||
-rw-r--r-- | xorg-server/render/glyphstr.h | 6 | ||||
-rw-r--r-- | xorg-server/render/render.c | 4 |
3 files changed, 28 insertions, 12 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; +} diff --git a/xorg-server/render/glyphstr.h b/xorg-server/render/glyphstr.h index cbc4751f0..7d178be01 100644 --- a/xorg-server/render/glyphstr.h +++ b/xorg-server/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_ */ diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c index 344ca75e2..fe7666d35 100644 --- a/xorg-server/render/render.c +++ b/xorg-server/render/render.c @@ -1136,11 +1136,11 @@ ProcRenderAddGlyphs(ClientPtr client) goto bail; } - GlyphPicture(glyph)[screen] = pDst = - CreatePicture(0, &pDstPix->drawable, + pDst = CreatePicture(0, &pDstPix->drawable, glyphSet->format, CPComponentAlpha, &component_alpha, serverClient, &error); + SetGlyphPicture(glyph, pScreen, pDst); /* The picture takes a reference to the pixmap, so we drop ours. */ |