mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-19 03:00:26 +01:00
clip: Intialise polygon fill-rule prior to use
The earliest use of the clip path's polygon fill rule is now for intersecting the original polygon with the plurality of clip boxes. However, the initialisation of the fill rule remained after the intersection. ==8968== Conditional jump or move depends on uninitialised value(s) ==8968== at 0x4C99449: _cairo_polygon_intersect (cairo-polygon-intersect.c:1382) ==8968== by 0x4C9B788: _cairo_polygon_intersect_with_boxes.part.12 (cairo-polygon-intersect.c:1520) ==8968== by 0x4C6AE6E: _cairo_clip_get_polygon (cairo-clip-polygon.c:104) ==8968== by 0x4CAA667: clip_and_composite_boxes.part.13 (cairo-spans-compositor.c:773) ==8968== by 0x4CAAD1D: clip_and_composite_boxes (cairo-spans-compositor.c:758) ==8968== by 0x4CAB25C: _cairo_spans_compositor_fill (cairo-spans-compositor.c:1023) ==8968== by 0x4C6CB69: _cairo_compositor_fill (cairo-compositor.c:184) ==8968== by 0x4C7CE3E: _cairo_image_surface_fill (cairo-image-surface.c:945) ==8968== by 0x4CAE2B6: _cairo_surface_fill (cairo-surface.c:2047) ==8968== by 0x4C74AB7: _cairo_gstate_fill (cairo-gstate.c:1268) ==8968== by 0x4C6E6D3: _cairo_default_context_fill (cairo-default-context.c:1009) ==8968== by 0x4C67944: cairo_fill (cairo.c:2105) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
ea0703524f
commit
94a9e06a93
1 changed files with 3 additions and 2 deletions
|
|
@ -94,6 +94,9 @@ _cairo_clip_get_polygon (const cairo_clip_t *clip,
|
|||
_cairo_polygon_init_with_clip (polygon, NULL);
|
||||
|
||||
clip_path = clip->path;
|
||||
*fill_rule = clip_path->fill_rule;
|
||||
*antialias = clip_path->antialias;
|
||||
|
||||
status = _cairo_path_fixed_fill_to_polygon (&clip_path->path,
|
||||
clip_path->tolerance,
|
||||
polygon);
|
||||
|
|
@ -110,8 +113,6 @@ _cairo_clip_get_polygon (const cairo_clip_t *clip,
|
|||
polygon->limits = NULL;
|
||||
polygon->num_limits = 0;
|
||||
|
||||
*fill_rule = clip_path->fill_rule;
|
||||
*antialias = clip_path->antialias;
|
||||
while ((clip_path = clip_path->prev) != NULL) {
|
||||
cairo_polygon_t next;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue