[cairo-commit] 2 commits - src/cairo-quartz-surface.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 28 05:42:53 UTC 2022
src/cairo-quartz-surface.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
New commits:
commit 0b5ec0139ce3766e6bfc98a9f366a20a4738ac4e
Merge: 7fa02c81f 77aac45db
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Wed Dec 28 05:42:51 2022 +0000
Merge branch 'pbounds-size' into 'master'
Ensure pbounds.size is initialized even in EXTEND_NONE mode.
See merge request cairo/cairo!363
commit 77aac45db742ed6dd5072d6296ac265ad11e496c
Author: Jonathan Kew <jfkthame at gmail.com>
Date: Wed Oct 19 14:59:45 2022 +0100
Ensure pbounds.size is initialized even in EXTEND_NONE mode.
Since the if/else was replaced by a switch() here in https://gitlab.freedesktop.org/cairo/cairo/-/commit/2e0075e265155ff144ced23ff87c4bed4cdfbc27,
the size field of pbounds is not being set in the EXTEND_NONE case,
which means we end up passing uninitialized values to CGPatternCreate.
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 6676dc960..4cb8d04d9 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -901,7 +901,7 @@ _cairo_quartz_cairo_repeating_surface_pattern_to_quartz (cairo_quartz_surface_t
switch (spattern->base.extend) {
case CAIRO_EXTEND_NONE:
- break;
+ case CAIRO_EXTEND_PAD:
case CAIRO_EXTEND_REPEAT:
pbounds.size.width = extents.width;
pbounds.size.height = extents.height;
@@ -911,10 +911,6 @@ _cairo_quartz_cairo_repeating_surface_pattern_to_quartz (cairo_quartz_surface_t
pbounds.size.height = 2.0 * extents.height;
info->do_reflect = TRUE;
break;
- case CAIRO_EXTEND_PAD:
- pbounds.size.width = extents.width;
- pbounds.size.height = extents.height;
- break;
}
rw = pbounds.size.width;
rh = pbounds.size.height;
More information about the cairo-commit
mailing list