diff options
author | Timm Bäder <mail@baedert.org> | 2020-01-11 13:40:13 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-01-18 08:49:51 +0100 |
commit | 24d8c0a7dccc12edc97753049c1b7765dd4d5a27 (patch) | |
tree | ae438868d480f52b0d8b9eadf7ce185446b3362c /gtk/gtkcsspalettevalue.c | |
parent | ba08f5e67da5dcb0bb68e23f50c37091846ce682 (diff) | |
download | gtk+-24d8c0a7dccc12edc97753049c1b7765dd4d5a27.tar.gz |
css: Set the is_computed flag for more values
With these changes, we skip roughly 85% of compute() calls during
widget-factory startup
Diffstat (limited to 'gtk/gtkcsspalettevalue.c')
-rw-r--r-- | gtk/gtkcsspalettevalue.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtkcsspalettevalue.c b/gtk/gtkcsspalettevalue.c index e7daca9a74..8245be9123 100644 --- a/gtk/gtkcsspalettevalue.c +++ b/gtk/gtkcsspalettevalue.c @@ -326,6 +326,8 @@ gtk_css_palette_value_parse (GtkCssParser *parser) return NULL; } + result->is_computed = result->is_computed && gtk_css_value_is_computed (color); + g_ptr_array_add (names, ident); g_ptr_array_add (colors, color); } while (gtk_css_parser_try_token (parser, GTK_CSS_TOKEN_COMMA)); |