diff options
author | Kristian Høgsberg <[email protected]> | 2010-07-23 16:15:31 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-07-23 22:05:53 -0400 |
commit | 6ec39db726beead21d97bf64ddbe1f0b2d2d6ca1 (patch) | |
tree | 65a665c1d10ab43618a2c508081a7cc7d31ab9ab /src/glx/drisw_glx.c | |
parent | b5dedd7c3b4425127d8b85b7e8df0ecda4009fd7 (diff) |
glx: Refactor and simplify context creation
This lets us better separate context creation between the different
backends.
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r-- | src/glx/drisw_glx.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index c971de2f76f..4265f564120 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -289,9 +289,9 @@ static const struct glx_context_vtable drisw_context_vtable = { }; static __GLXcontext * -driCreateContext(__GLXscreenConfigs *base, - const __GLcontextModes *mode, - GLXContext shareList, int renderType) +drisw_create_context(__GLXscreenConfigs *base, + const __GLcontextModes *mode, + GLXContext shareList, int renderType) { struct drisw_context *pcp, *pcp_shared; __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode; @@ -426,6 +426,10 @@ driOpenSwrast(void) return driver; } +static const struct glx_screen_vtable drisw_screen_vtable = { + drisw_create_context +}; + static __GLXscreenConfigs * driCreateScreen(int screen, __GLXdisplayPrivate *priv) { @@ -482,10 +486,10 @@ driCreateScreen(int screen, __GLXdisplayPrivate *priv) psc->driver_configs = driver_configs; + psc->base.vtable = &drisw_screen_vtable; psp = &psc->vtable; psc->base.driScreen = psp; psp->destroyScreen = driDestroyScreen; - psp->createContext = driCreateContext; psp->createDrawable = driCreateDrawable; psp->swapBuffers = driSwapBuffers; |