[pango/wip/baedert/for-master: 39/61] pangocairo-context: Don't invalidate if font options are equal
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/wip/baedert/for-master: 39/61] pangocairo-context: Don't invalidate if font options are equal
- Date: Mon, 8 Jun 2020 17:05:04 +0000 (UTC)
commit e36f7e4082172f2fdf324bdd6b35f0206c538a9f
Author: Timm Bäder <mail baedert org>
Date: Tue Apr 14 10:49:49 2020 +0200
pangocairo-context: Don't invalidate if font options are equal
pango/pangocairo-context.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]