[hb-cairo] Macro shuffle again

This commit is contained in:
Behdad Esfahbod 2023-01-20 15:43:01 -07:00
parent 4759932bcf
commit ab7c914425
1 changed files with 4 additions and 3 deletions

View File

@ -321,11 +321,11 @@ hb_cairo_paint_custom_palette_color (hb_paint_funcs_t *funcs,
hb_color_t *color,
void *user_data HB_UNUSED)
{
#define HB_DEADBEEF HB_TAG(0xDE,0xAD,0xBE,0xEF)
#ifdef HAVE_CAIRO_FONT_OPTIONS_GET_CUSTOM_PALETTE_COLOR
cairo_t *cr = (cairo_t *) paint_data;
#define HB_DEADBEEF HB_TAG(0xDE,0xAD,0xBE,0xEF)
hb_map_t *color_cache = (hb_map_t *) cairo_get_user_data (cr, &color_cache_key);
hb_codepoint_t *c;
if (likely (color_cache && color_cache->has (color_index, &c)))
@ -357,13 +357,14 @@ hb_cairo_paint_custom_palette_color (hb_paint_funcs_t *funcs,
return true;
}
cairo_font_options_destroy (options);
#endif
if (likely (color_cache))
color_cache->set (color_index, HB_DEADBEEF);
#undef HB_DEADBEEF
#endif
return false;
}