pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/pixman pixman: remove patches that were added as w...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f76963676799
branches:  trunk
changeset: 386936:f76963676799
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Tue Oct 18 11:01:01 2022 +0000

description:
pixman: remove patches that were added as workarounds for x server issues in 2011

Bump PKGREVISION.

diffstat:

 x11/pixman/Makefile         |    3 +-
 x11/pixman/distinfo         |    5 +-
 x11/pixman/patches/patch-ba |   82 ---------------------------------
 x11/pixman/patches/patch-bb |   13 -----
 x11/pixman/patches/patch-bc |  107 --------------------------------------------
 5 files changed, 3 insertions(+), 207 deletions(-)

diffs (242 lines):

diff -r 0ffd6e12c589 -r f76963676799 x11/pixman/Makefile
--- a/x11/pixman/Makefile       Tue Oct 18 10:58:10 2022 +0000
+++ b/x11/pixman/Makefile       Tue Oct 18 11:01:01 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.82 2022/10/18 10:58:00 wiz Exp $
+# $NetBSD: Makefile,v 1.83 2022/10/18 11:01:01 wiz Exp $
 
 DISTNAME=      pixman-0.42.0
+PKGREVISION=   1
 CATEGORIES=    x11
 MASTER_SITES=  ${MASTER_SITE_XORG:=lib/}
 EXTRACT_SUFX=  .tar.xz
diff -r 0ffd6e12c589 -r f76963676799 x11/pixman/distinfo
--- a/x11/pixman/distinfo       Tue Oct 18 10:58:10 2022 +0000
+++ b/x11/pixman/distinfo       Tue Oct 18 11:01:01 2022 +0000
@@ -1,11 +1,8 @@
-$NetBSD: distinfo,v 1.67 2022/10/18 10:58:00 wiz Exp $
+$NetBSD: distinfo,v 1.68 2022/10/18 11:01:01 wiz Exp $
 
 BLAKE2s (pixman-0.42.0.tar.xz) = 9846ec6a902afa54328b18a9a58cbdf7ad066aa69cbbfddb145b1475c6ad8899
 SHA512 (pixman-0.42.0.tar.xz) = 43d43d1aef9b8a6167098ab68ce2cfd8c0429c4825d40a4fb468b5b51dc1a2035f8bd1b70413e4ecd77deb469b5d558f42171b423e348d5ddd8604c466ffc7d9
 Size (pixman-0.42.0.tar.xz) = 652780 bytes
 SHA1 (patch-Makefile.in) = e59e216839f69d0c73b40c195b2c5414a10558f4
-SHA1 (patch-ba) = 9bd8a7fd0cfbd280df06d69838d3d10ab1b51e23
-SHA1 (patch-bb) = d47b1857771b8addb6897d45782ba2735a7aacbd
-SHA1 (patch-bc) = 3e23e6c482ea193885f3f762af355ef2f692132b
 SHA1 (patch-configure) = 55093c5c923ca18aa040e86bcabac60d8d4aab22
 SHA1 (patch-pixman_pixman-vmx.c) = d96dad41d94bf8dfb956afda00a5a175a9c1f6fc
diff -r 0ffd6e12c589 -r f76963676799 x11/pixman/patches/patch-ba
--- a/x11/pixman/patches/patch-ba       Tue Oct 18 10:58:10 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-$NetBSD: patch-ba,v 1.1 2011/10/27 16:52:51 drochner Exp $
-
---- pixman/pixman-image.c.orig 2011-06-09 19:19:44.000000000 +0000
-+++ pixman/pixman-image.c
-@@ -160,27 +160,54 @@ _pixman_image_reset_clip_region (pixman_
-     image->common.have_clip_region = FALSE;
- }
- 
--/* Executive Summary: This function is a no-op that only exists
-- * for historical reasons.
-- *
-- * There used to be a bug in the X server where it would rely on
-- * out-of-bounds accesses when it was asked to composite with a
-- * window as the source. It would create a pixman image pointing
-- * to some bogus position in memory, but then set a clip region
-- * to the position where the actual bits were.
-+static pixman_bool_t out_of_bounds_workaround = TRUE;
-+
-+/* Old X servers rely on out-of-bounds accesses when they are asked
-+ * to composite with a window as the source. They create a pixman image
-+ * pointing to some bogus position in memory, but then they set a clip
-+ * region to the position where the actual bits are.
-  *
-  * Due to a bug in old versions of pixman, where it would not clip
-  * against the image bounds when a clip region was set, this would
-- * actually work. So when the pixman bug was fixed, a workaround was
-- * added to allow certain out-of-bound accesses. This function disabled
-- * those workarounds.
-+ * actually work. So by default we allow certain out-of-bound access
-+ * to happen unless explicitly disabled.
-  *
-- * Since 0.21.2, pixman doesn't do these workarounds anymore, so now
-- * this function is a no-op.
-+ * Fixed X servers should call this function to disable the workaround.
-  */
- PIXMAN_EXPORT void
- pixman_disable_out_of_bounds_workaround (void)
- {
-+    out_of_bounds_workaround = FALSE;
-+}
-+
-+static pixman_bool_t
-+source_image_needs_out_of_bounds_workaround (bits_image_t *image)
-+{
-+    if (image->common.clip_sources                      &&
-+        image->common.repeat == PIXMAN_REPEAT_NONE      &&
-+      image->common.have_clip_region                  &&
-+        out_of_bounds_workaround)
-+    {
-+      if (!image->common.client_clip)
-+      {
-+          /* There is no client clip, so if the clip region extends beyond the
-+           * drawable geometry, it must be because the X server generated the
-+           * bogus clip region.
-+           */
-+          const pixman_box32_t *extents =
-+              pixman_region32_extents (&image->common.clip_region);
-+
-+          if (extents->x1 >= 0 && extents->x2 <= image->width &&
-+              extents->y1 >= 0 && extents->y2 <= image->height)
-+          {
-+              return FALSE;
-+          }
-+      }
-+
-+      return TRUE;
-+    }
-+
-+    return FALSE;
- }
- 
- static void
-@@ -332,6 +359,9 @@ compute_image_info (pixman_image_t *imag
-               flags |= FAST_PATH_IS_OPAQUE;
-       }
- 
-+      if (source_image_needs_out_of_bounds_workaround (&image->bits))
-+          flags |= FAST_PATH_NEEDS_WORKAROUND;
-+
-       if (image->bits.read_func || image->bits.write_func)
-           flags &= ~FAST_PATH_NO_ACCESSORS;
- 
diff -r 0ffd6e12c589 -r f76963676799 x11/pixman/patches/patch-bb
--- a/x11/pixman/patches/patch-bb       Tue Oct 18 10:58:10 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-bb,v 1.3 2013/05/24 13:28:04 wiz Exp $
-
---- pixman/pixman-private.h.orig       2013-04-30 20:42:20.000000000 +0000
-+++ pixman/pixman-private.h
-@@ -11,6 +11,8 @@
- #define BILINEAR_INTERPOLATION_BITS 7
- #define BILINEAR_INTERPOLATION_RANGE (1 << BILINEAR_INTERPOLATION_BITS)
- 
-+#define FAST_PATH_NEEDS_WORKAROUND            (1 << 26)
-+
- /*
-  * C specific part
-  */
diff -r 0ffd6e12c589 -r f76963676799 x11/pixman/patches/patch-bc
--- a/x11/pixman/patches/patch-bc       Tue Oct 18 10:58:10 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-$NetBSD: patch-bc,v 1.4 2013/05/24 13:28:04 wiz Exp $
-
---- pixman/pixman.c.orig       2013-04-18 05:03:32.000000000 +0000
-+++ pixman/pixman.c
-@@ -152,6 +152,57 @@ optimize_operator (pixman_op_t     op,
-     return operator_table[op].opaque_info[is_dest_opaque | is_source_opaque];
- }
- 
-+static void
-+apply_workaround (pixman_image_t *image,
-+                int32_t *       x,
-+                int32_t *       y,
-+                uint32_t **     save_bits,
-+                int *           save_dx,
-+                int *           save_dy)
-+{
-+    if (image && (image->common.flags & FAST_PATH_NEEDS_WORKAROUND))
-+    {
-+      /* Some X servers generate images that point to the
-+       * wrong place in memory, but then set the clip region
-+       * to point to the right place. Because of an old bug
-+       * in pixman, this would actually work.
-+       *
-+       * Here we try and undo the damage
-+       */
-+      int bpp = PIXMAN_FORMAT_BPP (image->bits.format) / 8;
-+      pixman_box32_t *extents;
-+      uint8_t *t;
-+      int dx, dy;
-+      
-+      extents = pixman_region32_extents (&(image->common.clip_region));
-+      dx = extents->x1;
-+      dy = extents->y1;
-+      
-+      *save_bits = image->bits.bits;
-+      
-+      *x -= dx;
-+      *y -= dy;
-+      pixman_region32_translate (&(image->common.clip_region), -dx, -dy);
-+      
-+      t = (uint8_t *)image->bits.bits;
-+      t += dy * image->bits.rowstride * 4 + dx * bpp;
-+      image->bits.bits = (uint32_t *)t;
-+      
-+      *save_dx = dx;
-+      *save_dy = dy;
-+    }
-+}
-+
-+static void
-+unapply_workaround (pixman_image_t *image, uint32_t *bits, int dx, int dy)
-+{
-+    if (image && (image->common.flags & FAST_PATH_NEEDS_WORKAROUND))
-+    {
-+      image->bits.bits = bits;
-+      pixman_region32_translate (&image->common.clip_region, dx, dy);
-+    }
-+}
-+
- /*
-  * Computing composite region
-  */
-@@ -588,6 +639,13 @@ pixman_image_composite32 (pixman_op_t   
-     pixman_composite_info_t info;
-     const pixman_box32_t *pbox;
-     int n;
-+    uint32_t *src_bits;
-+    int src_dx, src_dy;
-+    uint32_t *mask_bits;
-+    int mask_dx, mask_dy;
-+    uint32_t *dest_bits;
-+    int dest_dx, dest_dy;
-+    pixman_bool_t need_workaround;
- 
-     _pixman_image_validate (src);
-     if (mask)
-@@ -624,6 +682,16 @@ pixman_image_composite32 (pixman_op_t   
-           src_format = mask_format = PIXMAN_rpixbuf;
-     }
- 
-+    /* Check for workaround */
-+    need_workaround = (info.src_flags | info.mask_flags | info.dest_flags) & FAST_PATH_NEEDS_WORKAROUND;
-+
-+    if (need_workaround)
-+    {
-+      apply_workaround (src, &src_x, &src_y, &src_bits, &src_dx, &src_dy);
-+      apply_workaround (mask, &mask_x, &mask_y, &mask_bits, &mask_dx, &mask_dy);
-+      apply_workaround (dest, &dest_x, &dest_y, &dest_bits, &dest_dx, &dest_dy);
-+    }
-+
-     pixman_region32_init (&region);
- 
-     if (!_pixman_compute_composite_region32 (
-@@ -710,6 +778,13 @@ pixman_image_composite32 (pixman_op_t   
-     }
- 
- out:
-+    if (need_workaround)
-+    {
-+      unapply_workaround (src, src_bits, src_dx, src_dy);
-+      unapply_workaround (mask, mask_bits, mask_dx, mask_dy);
-+      unapply_workaround (dest, dest_bits, dest_dx, dest_dy);
-+    }
-+
-     pixman_region32_fini (&region);
- }
- 



Home | Main Index | Thread Index | Old Index