OSDN Git Service

st/wgl: make stw_lookup_context_locked() an inline function
authorBrian Paul <brianp@vmware.com>
Wed, 21 May 2014 17:32:30 +0000 (11:32 -0600)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 30 May 2014 17:52:39 +0000 (18:52 +0100)
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/state_trackers/wgl/stw_device.c
src/gallium/state_trackers/wgl/stw_device.h

index c808700..8f2cf9c 100644 (file)
@@ -190,19 +190,6 @@ stw_cleanup(void)
 }
 
 
-struct stw_context *
-stw_lookup_context_locked( DHGLRC dhglrc )
-{
-   if (dhglrc == 0)
-      return NULL;
-
-   if (stw_dev == NULL)
-      return NULL;
-
-   return (struct stw_context *) handle_table_get(stw_dev->ctx_table, dhglrc);
-}
-
-
 void APIENTRY
 DrvSetCallbackProcs(
    INT nProcs,
index 561d693..4a930b5 100644 (file)
@@ -76,10 +76,17 @@ struct stw_device
 #endif
 };
 
-struct stw_context *
-stw_lookup_context_locked( DHGLRC hglrc );
 
 extern struct stw_device *stw_dev;
 
 
+static INLINE struct stw_context *
+stw_lookup_context_locked( DHGLRC dhglrc )
+{
+   if (dhglrc == 0 || stw_dev == NULL)
+      return NULL;
+   return (struct stw_context *) handle_table_get(stw_dev->ctx_table, dhglrc);
+}
+
+
 #endif /* STW_DEVICE_H_ */