[prev in list] [next in list] [prev in thread] [next in thread]
List: cairo
Subject: Re: [cairo] [PATCH 4/6] Implement has_color_glyphs for freetype
From: Matthias Clasen <matthias.clasen () gmail ! com>
Date: 2016-04-09 14:07:22
Message-ID: CAFwd_vCweqRdD0ZkWj5FXHtwRRZ8qqLZgdZFhfHZ8nzj5nHiyA () mail ! gmail ! com
[Download RAW message or body]
On Sat, Apr 9, 2016 at 8:29 AM, Uli Schlachter <psychon@znc.in> wrote:
> Am 09.04.2016 um 05:22 schrieb matthias.clasen@gmail.com:
> [...]
>> +static cairo_bool_t
>> +_cairo_ft_has_color_glyphs (void *scaled)
>> +{
>> + cairo_ft_unscaled_font_t *unscaled = ((cairo_ft_scaled_font_t *)scaled)->unscaled;
>> +
>> + if (!unscaled->have_color_set) {
>> + FT_Face face;
>> + face = _cairo_ft_unscaled_font_lock_face (unscaled);
>> + _cairo_ft_unscaled_font_unlock_face (unscaled);
>> + }
>> +
>> + return unscaled->have_color;
>> +}
>> +
> [...]
>
> I suggest replaceing the above function with 'return rand() == 42'. It returns
> uninitialized memory anyway.
This could use a comment, maybe. If you look at
_cairo_ft_unscaled_font_lock_face, it has the side-effect of ensuring
that have_color is properly set.
--
cairo mailing list
cairo@cairographics.org
https://lists.cairographics.org/mailman/listinfo/cairo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic