[cairo] Use hb_malloc / hb_free
This commit is contained in:
parent
a9392c0cbb
commit
57352b8bd4
|
@ -293,7 +293,7 @@ _hb_cairo_paint_linear_gradient (hb_cairo_context_t *c,
|
||||||
|
|
||||||
len = hb_color_line_get_color_stops (color_line, 0, nullptr, nullptr);
|
len = hb_color_line_get_color_stops (color_line, 0, nullptr, nullptr);
|
||||||
if (len > PREALLOCATED_COLOR_STOPS)
|
if (len > PREALLOCATED_COLOR_STOPS)
|
||||||
stops = (hb_color_stop_t *) malloc (len * sizeof (hb_color_stop_t));
|
stops = (hb_color_stop_t *) hb_malloc (len * sizeof (hb_color_stop_t));
|
||||||
hb_color_line_get_color_stops (color_line, 0, &len, stops);
|
hb_color_line_get_color_stops (color_line, 0, &len, stops);
|
||||||
|
|
||||||
_hb_cairo_reduce_anchors (x0, y0, x1, y1, x2, y2, &xx0, &yy0, &xx1, &yy1);
|
_hb_cairo_reduce_anchors (x0, y0, x1, y1, x2, y2, &xx0, &yy0, &xx1, &yy1);
|
||||||
|
@ -322,7 +322,7 @@ _hb_cairo_paint_linear_gradient (hb_cairo_context_t *c,
|
||||||
cairo_pattern_destroy (pattern);
|
cairo_pattern_destroy (pattern);
|
||||||
|
|
||||||
if (stops != stops_)
|
if (stops != stops_)
|
||||||
free (stops);
|
hb_free (stops);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -374,7 +374,7 @@ _hb_cairo_paint_radial_gradient (hb_cairo_context_t *c,
|
||||||
cairo_pattern_destroy (pattern);
|
cairo_pattern_destroy (pattern);
|
||||||
|
|
||||||
if (stops != stops_)
|
if (stops != stops_)
|
||||||
free (stops);
|
hb_free (stops);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -784,9 +784,9 @@ _hb_cairo_add_sweep_gradient_patches (hb_color_stop_t *stops,
|
||||||
done:
|
done:
|
||||||
|
|
||||||
if (angles != angles_)
|
if (angles != angles_)
|
||||||
free (angles);
|
hb_free (angles);
|
||||||
if (colors != colors_)
|
if (colors != colors_)
|
||||||
free (colors);
|
hb_free (colors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -830,7 +830,7 @@ _hb_cairo_paint_sweep_gradient (hb_cairo_context_t *c,
|
||||||
cairo_pattern_destroy (pattern);
|
cairo_pattern_destroy (pattern);
|
||||||
|
|
||||||
if (stops != stops_)
|
if (stops != stops_)
|
||||||
free (stops);
|
hb_free (stops);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue