[PATCH xserver 5/8] glamor: Un-inline glamor_[gs]et_screen_private

Adam Jackson ajax at redhat.com
Wed Nov 1 20:31:33 UTC 2017


   text	   data	    bss	    dec	    hex	filename
2134764	  45210	 128704	2308678	 233a46	build/hw/kdrive/ephyr/Xephyr.before
2129972	  45210	 128704	2303886	 23278e	build/hw/kdrive/ephyr/Xephyr.after

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glamor/glamor.c      | 13 +++++++++++++
 glamor/glamor_priv.h | 15 ++++-----------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/glamor/glamor.c b/glamor/glamor.c
index b70759b65..cf4a76a7f 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -40,6 +40,19 @@ DevPrivateKeyRec glamor_screen_private_key;
 DevPrivateKeyRec glamor_pixmap_private_key;
 DevPrivateKeyRec glamor_gc_private_key;
 
+glamor_screen_private *
+glamor_get_screen_private(ScreenPtr screen)
+{
+    return (glamor_screen_private *)
+        dixLookupPrivate(&screen->devPrivates, &glamor_screen_private_key);
+}
+
+void
+glamor_set_screen_private(ScreenPtr screen, glamor_screen_private *priv)
+{
+    dixSetPrivate(&screen->devPrivates, &glamor_screen_private_key, priv);
+}
+
 /**
  * glamor_get_drawable_pixmap() returns a backing pixmap for a given drawable.
  *
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 8fc2d7bc4..315cd8e93 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -495,18 +495,11 @@ typedef struct {
 extern DevPrivateKeyRec glamor_gc_private_key;
 extern DevPrivateKeyRec glamor_screen_private_key;
 
-static inline glamor_screen_private *
-glamor_get_screen_private(ScreenPtr screen)
-{
-    return (glamor_screen_private *)
-        dixLookupPrivate(&screen->devPrivates, &glamor_screen_private_key);
-}
+extern glamor_screen_private *
+glamor_get_screen_private(ScreenPtr screen);
 
-static inline void
-glamor_set_screen_private(ScreenPtr screen, glamor_screen_private *priv)
-{
-    dixSetPrivate(&screen->devPrivates, &glamor_screen_private_key, priv);
-}
+extern void
+glamor_set_screen_private(ScreenPtr screen, glamor_screen_private *priv);
 
 static inline glamor_gc_private *
 glamor_get_gc_private(GCPtr gc)
-- 
2.14.3



More information about the xorg-devel mailing list