[gtk+] Make _gtk_css_lookup_get_missing inline
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Make _gtk_css_lookup_get_missing inline
- Date: Fri, 9 Nov 2012 09:19:05 +0000 (UTC)
commit e60c9219f1709b75ef6a7db91a3087127567d84a
Author: Alexander Larsson <alexl redhat com>
Date: Fri Nov 9 10:09:06 2012 +0100
Make _gtk_css_lookup_get_missing inline
This is called a lot in the loop in gtk_css_style_provider_lookup which
actually showed up on profiles.
gtk/gtkcsslookup.c | 19 -------------------
gtk/gtkcsslookupprivate.h | 20 +++++++++++++++++++-
2 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/gtk/gtkcsslookup.c b/gtk/gtkcsslookup.c
index 3b124ac..acd35b6 100644
--- a/gtk/gtkcsslookup.c
+++ b/gtk/gtkcsslookup.c
@@ -24,17 +24,6 @@
#include "gtkcssstylepropertyprivate.h"
#include "gtkstylepropertiesprivate.h"
-typedef struct {
- GtkCssSection *section;
- GtkCssValue *value;
- GtkCssValue *computed;
-} GtkCssLookupValue;
-
-struct _GtkCssLookup {
- GtkBitmask *missing;
- GtkCssLookupValue values[1];
-};
-
GtkCssLookup *
_gtk_css_lookup_new (const GtkBitmask *relevant)
{
@@ -65,14 +54,6 @@ _gtk_css_lookup_free (GtkCssLookup *lookup)
g_free (lookup);
}
-const GtkBitmask *
-_gtk_css_lookup_get_missing (const GtkCssLookup *lookup)
-{
- g_return_val_if_fail (lookup != NULL, NULL);
-
- return lookup->missing;
-}
-
gboolean
_gtk_css_lookup_is_missing (const GtkCssLookup *lookup,
guint id)
diff --git a/gtk/gtkcsslookupprivate.h b/gtk/gtkcsslookupprivate.h
index aed2d51..8e80097 100644
--- a/gtk/gtkcsslookupprivate.h
+++ b/gtk/gtkcsslookupprivate.h
@@ -28,10 +28,21 @@ G_BEGIN_DECLS
typedef struct _GtkCssLookup GtkCssLookup;
+typedef struct {
+ GtkCssSection *section;
+ GtkCssValue *value;
+ GtkCssValue *computed;
+} GtkCssLookupValue;
+
+struct _GtkCssLookup {
+ GtkBitmask *missing;
+ GtkCssLookupValue values[1];
+};
+
GtkCssLookup * _gtk_css_lookup_new (const GtkBitmask *relevant);
void _gtk_css_lookup_free (GtkCssLookup *lookup);
-const GtkBitmask * _gtk_css_lookup_get_missing (const GtkCssLookup *lookup);
+static inline const GtkBitmask *_gtk_css_lookup_get_missing (const GtkCssLookup *lookup);
gboolean _gtk_css_lookup_is_missing (const GtkCssLookup *lookup,
guint id);
void _gtk_css_lookup_set (GtkCssLookup *lookup,
@@ -47,6 +58,13 @@ void _gtk_css_lookup_resolve (GtkCssLookup
GtkCssComputedValues *values,
GtkCssComputedValues *parent_values);
+static inline const GtkBitmask *
+_gtk_css_lookup_get_missing (const GtkCssLookup *lookup)
+{
+ return lookup->missing;
+}
+
+
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]