summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/wgl
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-05-21 11:32:30 -0600
committerJosé Fonseca <[email protected]>2014-05-30 18:52:39 +0100
commitf9595e21bc97c114ffac8ef41209cc5f7aaa8b05 (patch)
tree245dd1c67021cecac1083dcdf12804c8bfb94eb3 /src/gallium/state_trackers/wgl
parentbd36cbfa5aa31817a04335a7c364224d0db64428 (diff)
st/wgl: make stw_lookup_context_locked() an inline function
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/wgl')
-rw-r--r--src/gallium/state_trackers/wgl/stw_device.c13
-rw-r--r--src/gallium/state_trackers/wgl/stw_device.h11
2 files changed, 9 insertions, 15 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index c8087009759..8f2cf9c7a1c 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -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,
diff --git a/src/gallium/state_trackers/wgl/stw_device.h b/src/gallium/state_trackers/wgl/stw_device.h
index 561d6930135..4a930b5bef8 100644
--- a/src/gallium/state_trackers/wgl/stw_device.h
+++ b/src/gallium/state_trackers/wgl/stw_device.h
@@ -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_ */