diff options
author | Timm Bäder <mail@baedert.org> | 2020-04-14 10:49:49 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-06-08 19:15:23 +0200 |
commit | 993ac0ad925e8a22e41591390d069d7ecf37518b (patch) | |
tree | 624ed05f96f0edca0380e710e0afad3799f610ce /pango/pangocairo-context.c | |
parent | b0c9b985cba225351e884786a08a321b030413c3 (diff) | |
download | pango-993ac0ad925e8a22e41591390d069d7ecf37518b.tar.gz |
pangocairo-context: Don't invalidate if font options are equal
Diffstat (limited to 'pango/pangocairo-context.c')
-rw-r--r-- | pango/pangocairo-context.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pango/pangocairo-context.c b/pango/pangocairo-context.c index 5949c448..959fcfe0 100644 --- a/pango/pangocairo-context.c +++ b/pango/pangocairo-context.c @@ -242,7 +242,15 @@ pango_cairo_context_set_font_options (PangoContext *context, g_return_if_fail (PANGO_IS_CONTEXT (context)); - info = get_context_info (context, TRUE); + info = get_context_info (context, TRUE); + + if (!info->set_options && !options) + return; + + if (info->set_options && + options && + cairo_font_options_equal (info->set_options, options)) + return; if (info->set_options || options) pango_context_changed (context); |