[PATCH 4/5] glamor: Set composite glyphs source offset to origin of first glyph

Keith Packard keithp at keithp.com
Tue May 26 13:47:54 PDT 2015


Pull the location of the first glyph out of the first list element and
adjust the source position to align them.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 glamor/glamor_composite_glyphs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c
index 5950e2c..6915ba8 100644
--- a/glamor/glamor_composite_glyphs.c
+++ b/glamor/glamor_composite_glyphs.c
@@ -350,6 +350,14 @@ glamor_composite_glyphs(CARD8 op,
 
     glyphs_queued = 0;
 
+    /* Adjust source location to align with the
+     * origin of the first glyph
+     */
+    if (nlist) {
+        x_src -= list->xOff;
+        y_src -= list->yOff;
+    }
+
     while (nlist--) {
         x += list->xOff;
         y += list->yOff;
-- 
2.1.4



More information about the xorg-devel mailing list