[cairo] [PATCH 19/41] drm/intel: fix font cleanup

Uli Schlachter psychon at znc.in
Fri Dec 11 08:54:37 PST 2015


Am 10.12.2015 um 23:16 schrieb Enrico Weigelt, metux IT consult:
> Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
> ---
>  src/drm/cairo-drm-intel.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/src/drm/cairo-drm-intel.c b/src/drm/cairo-drm-intel.c
> index 1abcd20..735b173 100644
> --- a/src/drm/cairo-drm-intel.c
> +++ b/src/drm/cairo-drm-intel.c
> @@ -800,16 +800,17 @@ _intel_glyph_cache_fini (intel_device_t *device, intel_buffer_cache_t *cache)
>  void
>  intel_device_fini (intel_device_t *device)
>  {
> -    cairo_scaled_font_t *scaled_font, *next_scaled_font;
>      int n;
>  
> -    cairo_list_foreach_entry_safe (scaled_font,
> -				   next_scaled_font,
> -				   cairo_scaled_font_t,
> -				   &device->fonts,
> -				   link)
> -    {
> -	_cairo_scaled_font_revoke_ownership (scaled_font);

What happened to this revoke ownership function? Git grep doesn't find it, so I
assume that it was removed from cairo, but the drm backend wasn't update?

If so, the commit message should mention that.

> +    while (! cairo_list_is_empty (&device->fonts)) {
> +	cairo_scaled_font_t *font;
> +
> +	font = cairo_list_first_entry (&device->fonts,
> +				       cairo_scaled_font_t,
> +				       link);
> +
> +	cairo_list_del (&font->link);
> +	free (font);
>      }
>  
>      for (n = 0; n < ARRAY_LENGTH (device->glyph_cache); n++)
> 


-- 
"Are you preparing for another war, Plutarch?" I ask.
"Oh, not now. Now we're in that sweet period where everyone agrees that our
recent horrors should never be repeated," he says. "But collective thinking is
usually short-lived. We're fickle, stupid beings with poor memories and a great
gift for self-destruction.


More information about the cairo mailing list