summaryrefslogtreecommitdiff
path: root/src/sna/sna_glyphs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-05-03 14:54:17 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-05-03 14:48:27 +0100
commitd47e98dd64c0b9fe2979db42622c5ee8168e8b35 (patch)
tree0750e3e27a72928fcbc132c1f73af3d8c81d3611 /src/sna/sna_glyphs.c
parenta1f08b8850616952fb0babe2275eb36b13a380ec (diff)
sna: Minor glyph fallback fixes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_glyphs.c')
-rw-r--r--src/sna/sna_glyphs.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index f4f115e6..07b2a942 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1136,6 +1136,8 @@ glyphs_fallback(CARD8 op,
mask_image = dst_image;
src_x -= x;
src_y -= y;
+ x += dst->pDrawable->x;
+ y += dst->pDrawable->y;
}
do {
@@ -1152,7 +1154,7 @@ glyphs_fallback(CARD8 op,
glyph_image = sna_glyph(g)->image;
if (glyph_image == NULL) {
PicturePtr picture;
- int dx, dy;
+ int gx, gy;
picture = GlyphPicture(g)[screen];
if (picture == NULL)
@@ -1160,11 +1162,11 @@ glyphs_fallback(CARD8 op,
glyph_image = image_from_pict(picture,
FALSE,
- &dx, &dy);
+ &gx, &gy);
if (!glyph_image)
goto next_glyph;
- assert(dx == 0 && dy == 0);
+ assert(gx == 0 && gy == 0);
sna_glyph(g)->image = glyph_image;
}
@@ -1191,11 +1193,15 @@ glyphs_fallback(CARD8 op,
int xi = x - g->info.x;
int yi = y - g->info.y;
- DBG(("%s: glyph+(%d, %d) to dst (%d, %d)x(%d, %d), src (%d, %d) [op=%d]\n",
+ DBG(("%s: glyph+(%d, %d) to dst (%d, %d)x(%d, %d)/[(%d, %d)x(%d, %d)], src (%d, %d) [op=%d]\n",
__FUNCTION__,
dx, dy,
xi, yi,
g->info.width, g->info.height,
+ dst->pDrawable->x,
+ dst->pDrawable->y,
+ dst->pDrawable->width,
+ dst->pDrawable->height,
src_x + xi,
src_y + yi,
op));
@@ -1261,7 +1267,7 @@ sna_glyphs(CARD8 op,
if (REGION_NUM_RECTS(dst->pCompositeClip) == 0)
return;
- if (FALLBACK || DEBUG_NO_RENDER)
+ if (FALLBACK || !sna->have_render)
goto fallback;
if (wedged(sna)) {