[PATCH] fb: Fix origin of source picture in fbGlyphs

Peter Harris pharris at opentext.com
Fri Apr 11 14:44:59 PDT 2014


If a source picture doesn't repeat and a mask format is specified, the
incorrect calulation of the origin of the glyphs caused the glyphs to
not be drawn at all.

Noticed when running gtk-demo from RHEL 6.5 and selecting "Rotated
Text".

Signed-off-by: Peter Harris <pharris at opentext.com>
---
 fb/fbpict.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fb/fbpict.c b/fb/fbpict.c
index c2ee8a5..21baf89 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -191,7 +191,7 @@ fbGlyphs(CARD8 op,
 	pixman_glyph_get_extents(glyphCache, n_glyphs, pglyphs, &extents);
 
 	pixman_composite_glyphs(op, srcImage, dstImage, format,
-				xSrc + srcXoff + xDst, ySrc + srcYoff + yDst,
+				xSrc + srcXoff + extents.x1 - xDst, ySrc + srcYoff + extents.y1 - yDst,
 				extents.x1, extents.y1,
 				extents.x1 + dstXoff, extents.y1 + dstYoff,
 				extents.x2 - extents.x1,
-- 
1.9.1



More information about the xorg-devel mailing list