head 1.2; access; symbols pkgsrc-2022Q3:1.1.0.88 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.86 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.84 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.82 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.80 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.78 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.76 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.74 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.72 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.68 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.48 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.70 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.66 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.64 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.62 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.60 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.58 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.56 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.54 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.52 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.50 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.46 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.44 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.42 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.40 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.38 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.36 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.34 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.32 pkgsrc-2015Q3-base:1.1 pkgsrc-2015Q2:1.1.0.30 pkgsrc-2015Q2-base:1.1 pkgsrc-2015Q1:1.1.0.28 pkgsrc-2015Q1-base:1.1 pkgsrc-2014Q4:1.1.0.26 pkgsrc-2014Q4-base:1.1 pkgsrc-2014Q3:1.1.0.24 pkgsrc-2014Q3-base:1.1 pkgsrc-2014Q2:1.1.0.22 pkgsrc-2014Q2-base:1.1 pkgsrc-2014Q1:1.1.0.20 pkgsrc-2014Q1-base:1.1 pkgsrc-2013Q4:1.1.0.18 pkgsrc-2013Q4-base:1.1 pkgsrc-2013Q3:1.1.0.16 pkgsrc-2013Q3-base:1.1 pkgsrc-2013Q2:1.1.0.14 pkgsrc-2013Q2-base:1.1 pkgsrc-2013Q1:1.1.0.12 pkgsrc-2013Q1-base:1.1 pkgsrc-2012Q4:1.1.0.10 pkgsrc-2012Q4-base:1.1 pkgsrc-2012Q3:1.1.0.8 pkgsrc-2012Q3-base:1.1 pkgsrc-2012Q2:1.1.0.6 pkgsrc-2012Q2-base:1.1 pkgsrc-2012Q1:1.1.0.4 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.2 pkgsrc-2011Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2022.10.18.11.01.01; author wiz; state dead; branches; next 1.1; commitid dDmH9r9PNZrzPbYD; 1.1 date 2011.10.27.16.52.51; author drochner; state Exp; branches; next ; desc @@ 1.2 log @pixman: remove patches that were added as workarounds for x server issues in 2011 Bump PKGREVISION. @ text @$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; @ 1.1 log @re-add a workaround for a clipping related bug in Xorg<=1.6. This was removed upstream but is still needed for pkgsrc's modular-xorg. Fixes PR pkg/45509 by Francois Tigeot. Thankd for Francois for providing a pointer to the offending change. bump PKGREV @ text @d1 1 a1 1 $NetBSD$ @