summaryrefslogtreecommitdiffstats
path: root/gfx/cairo/pixman-image-transform.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /gfx/cairo/pixman-image-transform.patch
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/cairo/pixman-image-transform.patch')
-rw-r--r--gfx/cairo/pixman-image-transform.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/gfx/cairo/pixman-image-transform.patch b/gfx/cairo/pixman-image-transform.patch
new file mode 100644
index 0000000000..2f93d315a5
--- /dev/null
+++ b/gfx/cairo/pixman-image-transform.patch
@@ -0,0 +1,52 @@
+# HG changeset patch
+# User Jeff Muizelaar <jmuizelaar@mozilla.com>
+# Date 1299543337 18000
+# Node ID 57f411f16517fa3abc31b6b081dd31420c4d9b45
+# Parent e56ecd8b3a68c158025207c5fd081d043e28f5ce
+Bug 637828. Reset the transform on the dest image. r=joe
+
+We can get into a situation where the destination image has a transform
+because we use it as source. The transform set when the image is a source
+sticks around and when we use it as a destination pixman gets confused.
+
+It seems like the code at fault here is really pixman. I think that pixman
+should probably not be using a transformed fetch on the destination image under
+any circumstances.
+
+For example, in this case we're fetching destination pixels from a different
+part of the image than we're storing them to. I can't see any reason for
+wanting this behaviour.
+
+However, reseting the transform seemed like the easiest solution.
+
+diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
+--- a/gfx/cairo/cairo/src/cairo-image-surface.c
++++ b/gfx/cairo/cairo/src/cairo-image-surface.c
+@@ -1138,16 +1138,27 @@ _cairo_image_surface_composite (cairo_op
+ return status;
+
+ status = _cairo_image_surface_set_attributes (src, &src_attr,
+ dst_x + width / 2.,
+ dst_y + height / 2.);
+ if (unlikely (status))
+ goto CLEANUP_SURFACES;
+
++ /* we sometimes get destinations with transforms.
++ * we're not equiped to deal with this */
++ {
++ static const pixman_transform_t id = {
++ {{ pixman_fixed_1, 0, 0 },
++ { 0, pixman_fixed_1, 0 },
++ { 0, 0, pixman_fixed_1 }}
++ };
++ pixman_image_set_transform (dst->pixman_image, &id);
++ }
++
+ if (mask) {
+ status = _cairo_image_surface_set_attributes (mask, &mask_attr,
+ dst_x + width / 2.,
+ dst_y + height / 2.);
+ if (unlikely (status))
+ goto CLEANUP_SURFACES;
+
+ pixman_image_composite (_pixman_operator (op),