summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/sna_glyphs.c15
-rw-r--r--uxa/uxa-glyphs.c9
2 files changed, 11 insertions, 13 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index 2af7e809..0a2e0426 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -221,7 +221,7 @@ glyph_cache_upload(ScreenPtr screen,
DBG(("%s: upload glyph %p to cache (%d, %d)x(%d, %d)\n",
__FUNCTION__, glyph, x, y, glyph->info.width, glyph->info.height));
sna_composite(PictOpSrc,
- GlyphPicture(glyph)[screen->myNum], 0, cache->picture,
+ GetGlyphPicture(glyph, screen), 0, cache->picture,
0, 0,
0, 0,
x, y,
@@ -302,7 +302,7 @@ glyph_cache(ScreenPtr screen,
struct sna_render *render,
GlyphPtr glyph)
{
- PicturePtr glyph_picture = GlyphPicture(glyph)[screen->myNum];
+ PicturePtr glyph_picture = GetGlyphPicture(glyph, screen);
struct sna_glyph_cache *cache = &render->glyph[PICT_FORMAT_RGB(glyph_picture->format) != 0];
struct sna_glyph *priv;
int size, mask, pos, s;
@@ -460,7 +460,7 @@ glyphs_to_dst(struct sna *sna,
}
if (!glyph_cache(screen, &sna->render, glyph)) {
/* no cache for this glyph */
- priv.atlas = GlyphPicture(glyph)[index];
+ priv.atlas = GetGlyphPicture(glyph, screen);
priv.coordinate.x = priv.coordinate.y = 0;
} else
priv = *sna_glyph(glyph);
@@ -600,7 +600,7 @@ glyphs_slow(struct sna *sna,
if (priv.atlas == NULL) {
if (!glyph_cache(screen, &sna->render, glyph)) {
/* no cache for this glyph */
- priv.atlas = GlyphPicture(glyph)[index];
+ priv.atlas = GetGlyphPicture(glyph, screen);
priv.coordinate.x = priv.coordinate.y = 0;
} else
priv = *sna_glyph(glyph);
@@ -813,7 +813,7 @@ upload:
if (glyph_image == NULL) {
int dx, dy;
- picture = GlyphPicture(g)[s];
+ picture = GetGlyphPicture(g, dst->pDrawable->pScreen);
if (picture == NULL)
goto next_image;
@@ -908,7 +908,7 @@ next_image:
r.src = priv->coordinate;
} else {
/* no cache for this glyph */
- this_atlas = GlyphPicture(glyph)[index];
+ this_atlas = GetGlyphPicture(glyph, screen);
r.src.x = r.src.y = 0;
}
}
@@ -1046,7 +1046,6 @@ glyphs_fallback(CARD8 op,
GlyphListPtr list,
GlyphPtr *glyphs)
{
- int screen = dst->pDrawable->pScreen->myNum;
pixman_image_t *dst_image, *mask_image, *src_image;
int dx, dy, x, y;
BoxRec box;
@@ -1156,7 +1155,7 @@ glyphs_fallback(CARD8 op,
PicturePtr picture;
int gx, gy;
- picture = GlyphPicture(g)[screen];
+ picture = GetGlyphPicture(g, dst->pDrawable->pScreen);
if (picture == NULL)
goto next_glyph;
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 921b99c9..7db094b4 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -235,7 +235,7 @@ uxa_glyph_cache_upload_glyph(ScreenPtr screen,
GlyphPtr glyph,
int x, int y)
{
- PicturePtr pGlyphPicture = GlyphPicture(glyph)[screen->myNum];
+ PicturePtr pGlyphPicture = GetGlyphPicture(glyph, screen);
PixmapPtr pGlyphPixmap = (PixmapPtr) pGlyphPicture->pDrawable;
PixmapPtr pCachePixmap = (PixmapPtr) cache->picture->pDrawable;
PixmapPtr scratch;
@@ -449,7 +449,6 @@ uxa_check_glyphs(CARD8 op,
INT16 xSrc,
INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs)
{
- int screen = dst->pDrawable->pScreen->myNum;
pixman_image_t *image;
PixmapPtr scratch;
PicturePtr mask;
@@ -513,7 +512,7 @@ uxa_check_glyphs(CARD8 op,
n = list->len;
while (n--) {
GlyphPtr glyph = *glyphs++;
- PicturePtr g = GlyphPicture(glyph)[screen];
+ PicturePtr g = GetGlyphPicture(glyph, dst->pDrawable->pScreen);
if (g) {
if (maskFormat) {
CompositePicture(PictOpAdd, g, NULL, mask,
@@ -579,7 +578,7 @@ static PicturePtr
uxa_glyph_cache(ScreenPtr screen, GlyphPtr glyph, int *out_x, int *out_y)
{
uxa_screen_t *uxa_screen = uxa_get_screen(screen);
- PicturePtr glyph_picture = GlyphPicture(glyph)[screen->myNum];
+ PicturePtr glyph_picture = GetGlyphPicture(glyph, screen);
uxa_glyph_cache_t *cache = &uxa_screen->glyphCaches[PICT_FORMAT_RGB(glyph_picture->format) != 0];
struct uxa_glyph *priv = NULL;
int size, mask, pos, s;
@@ -796,7 +795,7 @@ uxa_glyphs_via_mask(CARD8 op,
this_atlas = uxa_glyph_cache(screen, glyph, &src_x, &src_y);
if (this_atlas == NULL) {
/* no cache for this glyph */
- this_atlas = GlyphPicture(glyph)[screen->myNum];
+ this_atlas = GetGlyphPicture(glyph, screen);
src_x = src_y = 0;
}
}