aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor/glamor_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glamor/glamor_utils.h')
-rw-r--r--xorg-server/glamor/glamor_utils.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/xorg-server/glamor/glamor_utils.h b/xorg-server/glamor/glamor_utils.h
index 53b7d9bec..4c1581ef5 100644
--- a/xorg-server/glamor/glamor_utils.h
+++ b/xorg-server/glamor/glamor_utils.h
@@ -1499,15 +1499,12 @@ __fls(unsigned long x)
#endif
static inline void
-glamor_get_context(glamor_screen_private * glamor_priv)
+glamor_make_current(glamor_screen_private *glamor_priv)
{
- glamor_priv->ctx.get_context(&glamor_priv->ctx);
-}
-
-static inline void
-glamor_put_context(glamor_screen_private * glamor_priv)
-{
- glamor_priv->ctx.put_context(&glamor_priv->ctx);
+ if (lastGLContext != &glamor_priv->ctx) {
+ lastGLContext = &glamor_priv->ctx;
+ glamor_priv->ctx.make_current(&glamor_priv->ctx);
+ }
}
#endif