[PATCH] XCB: Fix some weird code

Uli Schlachter psychon at znc.in
Sun Oct 3 12:15:07 PDT 2010


In the XCB backend, drawing a surface pattern always caused an extend of
CAIRO_EXTEND_NONE to be used. This caused e.g. all the
surface-pattern-scale-down-extend-* tests in the test suite to fail.

Signed-off-by: Uli Schlachter <psychon at znc.in>
---
 src/cairo-xcb-surface-render.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 8294a47..196477a 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1412,13 +1412,7 @@ setup_picture:
 				   extents->y + extents->height/2.);
 
 
-    extend = pattern->base.extend;
-    if (extents->x >= 0 && extents->x + extents->width <= picture->width &&
-	extents->y >= 0 && extents->y + extents->height <= picture->height)
-    {
-	extend = CAIRO_EXTEND_NONE;
-    }
-    _cairo_xcb_picture_set_extend (picture, extend);
+    _cairo_xcb_picture_set_extend (picture, pattern->base.extend);
     _cairo_xcb_picture_set_component_alpha (picture, pattern->base.has_component_alpha);
 
     return picture;
-- 
1.7.1


--------------030607080608030803080403
Content-Type: application/octet-stream;
 name="0001-XCB-Fix-some-weird-code.patch.sig"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="0001-XCB-Fix-some-weird-code.patch.sig"

iQEcBAABCAAGBQJMqNedAAoJECLkKOvLj8sGcWYH/2rWF5lLm1Beic4d/ZENyd/gnrr0bVgG
OEdlGH2NXYrtJw/RGqfT9l8Pk1VYQcB29GCGtFf0JV/hK5XxySsmfGcJno5sWodaFGDZ+DA2
+j2dE3J9HWgFVJJ8nYF1ggPe2DyIXCIuZgm6yrv6VAsCrC2iN2d5BwTPkC7MR8CnyKEJq8CD
oJrcObo7m8c9NrFsaaxXRf8sqeDk1oQBWo8c94ymoipD8Mv0o6nsowdRNip1c38ecSQpjLXn
UoTx6Gf2OuoU0YqXln4S67ich1B1qPxoQ1a+6F1RRRhyQwSZfKeAMiSwSZ5d2MeQaxyTnQqq
Ji/offvtnz/qMEXAI7XCtho=
--------------030607080608030803080403--


More information about the cairo mailing list