forked from AuroraMiddleware/gtk
css: Don't do the "all set" test
We have so many properties that it is basically impossible that all of them are set and the time spent checking is higher than the time saved if it does indeed happen.
This commit is contained in:
parent
17ca95a161
commit
65050a1c81
@ -44,12 +44,6 @@ _gtk_css_lookup_is_missing (const GtkCssLookup *lookup,
|
||||
return lookup->values[id].value == NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gtk_css_lookup_all_set (const GtkCssLookup *lookup)
|
||||
{
|
||||
return lookup->n_set_values == GTK_CSS_PROPERTY_N_PROPERTIES;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gtk_css_lookup_set:
|
||||
* @lookup: the lookup
|
||||
@ -75,7 +69,6 @@ _gtk_css_lookup_set (GtkCssLookup *lookup,
|
||||
|
||||
lookup->values[id].value = value;
|
||||
lookup->values[id].section = section;
|
||||
lookup->n_set_values ++;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,6 @@ typedef struct {
|
||||
} GtkCssLookupValue;
|
||||
|
||||
struct _GtkCssLookup {
|
||||
guint n_set_values;
|
||||
GtkCssLookupValue values[GTK_CSS_PROPERTY_N_PROPERTIES];
|
||||
};
|
||||
|
||||
@ -44,7 +43,6 @@ void _gtk_css_lookup_init (GtkCssLookup
|
||||
void _gtk_css_lookup_destroy (GtkCssLookup *lookup);
|
||||
gboolean _gtk_css_lookup_is_missing (const GtkCssLookup *lookup,
|
||||
guint id);
|
||||
gboolean _gtk_css_lookup_all_set (const GtkCssLookup *lookup);
|
||||
void _gtk_css_lookup_set (GtkCssLookup *lookup,
|
||||
guint id,
|
||||
GtkCssSection *section,
|
||||
|
@ -489,9 +489,6 @@ gtk_css_style_provider_lookup (GtkStyleProvider *provider,
|
||||
ruleset->styles[j].section,
|
||||
ruleset->styles[j].value);
|
||||
}
|
||||
|
||||
if (_gtk_css_lookup_all_set (lookup))
|
||||
break;
|
||||
}
|
||||
|
||||
g_ptr_array_free (tree_rules, TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user