summaryrefslogtreecommitdiff
path: root/glamor/glamor_utils.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-18 15:27:52 -0800
committerEric Anholt <eric@anholt.net>2014-02-14 18:30:01 -0800
commit4afe15d8bfd575c010ed1868697a7922a37ab378 (patch)
tree5b3b4a274ce3e36ef104f782039bebc04a8b752c /glamor/glamor_utils.h
parent781c692cf970642865f0e537f4905c43192f9935 (diff)
glamor: Put in a pluggable context switcher for GLX versus EGL.
The GLX side just gets the context from the current state. That's also something I want to do for EGL, so that the making a context is separate from initializing glamor, but I think I need the modesetting driver in the server before I think about hacking on that more. The previous code was rather incestuous, along with pulling in xf86 dependencies to our dix code. The new code just initializes itself from the current state. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glamor/glamor_utils.h')
-rw-r--r--glamor/glamor_utils.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h
index b82517a83..eafd2bc06 100644
--- a/glamor/glamor_utils.h
+++ b/glamor/glamor_utils.h
@@ -1817,29 +1817,15 @@ __fls(unsigned long x)
#endif
static inline void
-glamor_make_current(ScreenPtr screen)
-{
- glamor_egl_make_current(screen);
-}
-
-static inline void
-glamor_restore_current(ScreenPtr screen)
-{
- glamor_egl_restore_context(screen);
-}
-
-static inline void
glamor_get_context(glamor_screen_private * glamor_priv)
{
- if (glamor_priv->flags & GLAMOR_USE_EGL_SCREEN)
- glamor_make_current(glamor_priv->screen);
+ glamor_priv->ctx.get_context(&glamor_priv->ctx);
}
static inline void
glamor_put_context(glamor_screen_private * glamor_priv)
{
- if (glamor_priv->flags & GLAMOR_USE_EGL_SCREEN)
- glamor_restore_current(glamor_priv->screen);
+ glamor_priv->ctx.put_context(&glamor_priv->ctx);
}
#endif