~ubuntu-branches/ubuntu/maverick/cairo/maverick

« back to all changes in this revision

Viewing changes to debian/patches/91_git_image_translation.patch

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-12 15:05:20 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100712150520-npe5ckj12ht0s8j2
Tags: 1.9.12-1
* New upstream development release:
  + debian/rules:
    - Drop --disable-shave, cairo uses automake 1.11
      silent rules now.
  + debian/patches/03_no-cxx.patch,
    debian/patches/05_am-maintainer-mode.patch,
    debian/patches/99_autoreconf.patch:
    - Dropped, first patch merged upstream and the
      other two are not necessary anymore.
  + debian/libcairo2.symbols,
    debian/rules:
    - Update symbols and shlibs version for the new API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 1f84f5682c6ff246b3d28c75c8731504f31c1ee1 Mon Sep 17 00:00:00 2001
2
 
From: Chris Wilson <chris@chris-wilson.co.uk>
3
 
Date: Fri, 02 Jul 2010 12:19:17 +0000
4
 
Subject: xlib: Apply translation to image surface upload.
5
 
 
6
 
Fixes:
7
 
 
8
 
  Bug 28888 - cairo_paint with rgb images does not work correctly
9
 
  https://bugs.freedesktop.org/show_bug.cgi?id=28888
10
 
---
11
 
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
12
 
index 0281efb..baf4302 100644
13
 
--- a/src/cairo-xlib-surface.c
14
 
+++ b/src/cairo-xlib-surface.c
15
 
@@ -2329,11 +2329,14 @@ _cairo_xlib_surface_upload(cairo_xlib_surface_t *surface,
16
 
     if (! _cairo_matrix_is_integer_translation (&pattern->matrix, &tx, &ty))
17
 
        return CAIRO_INT_STATUS_UNSUPPORTED;
18
 
 
19
 
+    src_x += tx;
20
 
+    src_y += ty;
21
 
+
22
 
     /* XXX for EXTEND_NONE perform unbounded fixups? */
23
 
-    if (src_x + tx < extents.x ||
24
 
-       src_y + ty < extents.y ||
25
 
-       src_x + tx + width  > (unsigned) extents.width ||
26
 
-       src_y + ty + height > (unsigned) extents.height)
27
 
+    if (src_x < extents.x ||
28
 
+       src_y < extents.y ||
29
 
+       src_x + width  > (unsigned) extents.width ||
30
 
+       src_y + height > (unsigned) extents.height)
31
 
     {
32
 
        return CAIRO_INT_STATUS_UNSUPPORTED;
33
 
     }
34
 
@@ -2354,7 +2357,7 @@ _cairo_xlib_surface_upload(cairo_xlib_surface_t *surface,
35
 
 
36
 
            cairo_region_get_rectangle (clip_region, n, &rect);
37
 
            status = _draw_image_surface (surface, image,
38
 
-                                         rect.x + src_x, rect.x + src_y,
39
 
+                                         rect.x + src_x, rect.y + src_y,
40
 
                                          rect.width, rect.height,
41
 
                                          rect.x, rect.y);
42
 
            if (unlikely (status))
43
 
--
44
 
cgit v0.8.3-6-g21f6
45