diff options
author | Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net> | 2016-06-30 17:45:44 +0200 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2016-07-02 13:35:38 +0200 |
commit | 5bb43c92b3b35e9df8bdb8b14997e98c4a05d917 (patch) | |
tree | 372236a49b25705b07d34ff627ba71a798b48844 /src/cairo-clip-boxes.c | |
parent | b23c2291d8fdebd417697d5b70f31226632e3a1e (diff) | |
download | cairo-5bb43c92b3b35e9df8bdb8b14997e98c4a05d917.tar.gz |
core: dropped actually unused parameter of _cairo_boxes_to_array()
When parameter force_allocation is false *and* the box set has
exactly one chunk, this chunk is returned directly - w/o copying it.
That mode is never used, and it's highly problematic as it's unclear
whether we have to free the returnd object or it's still owned
by somebody else.
Just dropping the useless parameter / corner case to make the function
simpler and more robust.
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/cairo-clip-boxes.c')
-rw-r--r-- | src/cairo-clip-boxes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c index f9ccfcb7c..6e4b50d49 100644 --- a/src/cairo-clip-boxes.c +++ b/src/cairo-clip-boxes.c @@ -306,7 +306,7 @@ _cairo_clip_intersect_boxes (cairo_clip_t *clip, clip->boxes[0] = boxes->chunks.base[0]; clip->num_boxes = 1; } else { - clip->boxes = _cairo_boxes_to_array (boxes, &clip->num_boxes, TRUE); + clip->boxes = _cairo_boxes_to_array (boxes, &clip->num_boxes); } _cairo_boxes_extents (boxes, &limits); @@ -580,7 +580,7 @@ _cairo_clip_from_boxes (const cairo_boxes_t *boxes) clip->boxes[0] = boxes->chunks.base[0]; clip->num_boxes = 1; } else { - clip->boxes = _cairo_boxes_to_array (boxes, &clip->num_boxes, TRUE); + clip->boxes = _cairo_boxes_to_array (boxes, &clip->num_boxes); if (clip->boxes == NULL) return _cairo_clip_set_all_clipped (clip); } |