diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2011-12-10 15:15:18 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2012-05-23 13:08:12 -0700 |
commit | cd5689cac5ed722e9dc1a3fab9a260b798062ee6 (patch) | |
tree | a0bf3537fbfb83475509ebdd1d74f76046f555fe /glx/glxcmds.c | |
parent | c1d91ab37025d3e0df7e8f647fb21816fe0e8420 (diff) |
glx: Use one function to add a context to all global tables
Instead of having separate __glXAddContextToList and AddResource
functions, just have one function that does both steps.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Diffstat (limited to 'glx/glxcmds.c')
-rw-r--r-- | glx/glxcmds.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c index 8a9a1d3b0..d9d22019b 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -308,16 +308,14 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId, glxc->drawPriv = NULL; glxc->readPriv = NULL; - /* Register this context as a resource. + /* Add the new context to the various global tables of GLX contexts. */ - if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) { + if (!__glXAddContext(glxc)) { (*glxc->destroy) (glxc); client->errorValue = gcId; return BadAlloc; } - __glXAddToContextList(glxc); - return Success; } |