diff options
author | Eric Anholt <eric@anholt.net> | 2014-03-14 17:31:18 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-04-23 10:32:23 -0700 |
commit | fab0a4a4c9dad2275bb398d09632f4274b5e16f2 (patch) | |
tree | 0c32caee6cefb480f03c53e8c8aa189500a880be /glamor/glamor_glx.c | |
parent | 11ff12d4e74c0b514cb62cc47df9770c91e5002a (diff) |
glamor: Replace glamor_get/put_context() with just glamor_make_current().
Now that we have the DIX global state for the current context, we
don't need to track nesting to try to reduce MakeCurrent overhead.
v2: Fix a mistaken replacement of a put_context with make_current in
glamor_fill_spans_gl() (caught by keithp).
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v1)
Reviewed-by: Adam Jackson <ajax@redhat.com> (v1)
Diffstat (limited to 'glamor/glamor_glx.c')
-rw-r--r-- | glamor/glamor_glx.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/glamor/glamor_glx.c b/glamor/glamor_glx.c index d56581cd7..db8e66165 100644 --- a/glamor/glamor_glx.c +++ b/glamor/glamor_glx.c @@ -34,22 +34,13 @@ */ static void -glamor_glx_get_context(struct glamor_context *glamor_ctx) +glamor_glx_make_current(struct glamor_context *glamor_ctx) { - if (glamor_ctx->get_count++) - return; - glXMakeCurrent(glamor_ctx->display, glamor_ctx->drawable_xid, glamor_ctx->ctx); } -static void -glamor_glx_put_context(struct glamor_context *glamor_ctx) -{ - --glamor_ctx->get_count; -} - Bool glamor_glx_screen_init(struct glamor_context *glamor_ctx) { @@ -63,8 +54,7 @@ glamor_glx_screen_init(struct glamor_context *glamor_ctx) glamor_ctx->drawable_xid = glXGetCurrentDrawable(); - glamor_ctx->get_context = glamor_glx_get_context; - glamor_ctx->put_context = glamor_glx_put_context; + glamor_ctx->make_current = glamor_glx_make_current; return True; } |