[Pixman] [PATCH] If we bail out of do_composite, make sure to undo any workarounds.

Søren Sandmann sandmann at daimi.au.dk
Wed Jul 28 02:50:34 PDT 2010


From: Søren Sandmann Pedersen <ssp at redhat.com>

The workaround for an old X bug has to be undone if we bail from
do_composite, so we can't just return.
---
 pixman/pixman.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/pixman/pixman.c b/pixman/pixman.c
index 80a766a..2d06ce2 100644
--- a/pixman/pixman.c
+++ b/pixman/pixman.c
@@ -742,7 +742,7 @@ do_composite (pixman_op_t	       op,
 	    &region, src, mask, dest,
 	    src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height))
     {
-	return;
+	goto out;
     }
     
     extents = pixman_region32_extents (&region);
@@ -759,7 +759,7 @@ do_composite (pixman_op_t	       op,
      */
     op = optimize_operator (op, src_flags, mask_flags, dest_flags);
     if (op == PIXMAN_OP_DST)
-	return;
+	goto out;
 
     lookup_composite_function (op,
 			       src_format, src_flags,
@@ -776,6 +776,7 @@ do_composite (pixman_op_t	       op,
 			  (mask_flags & FAST_PATH_SIMPLE_REPEAT),
 			  &region, func);
 
+out:
     if (need_workaround)
     {
 	unapply_workaround (src, src_bits, src_dx, src_dy);
-- 
1.7.1.1



More information about the Pixman mailing list