X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glxwrap.c;h=4b87642e08846612d8d3f2ce1739e39db7373cb8;hb=dfb96c9b64def8674a38dda2bc2276d4e2cdd58e;hp=59d3e8eb35cdd9818b6f1d5678133f00a5d90a9f;hpb=5169acf1de805f8ad277554f6ec064e8f36111c3;p=fips diff --git a/glxwrap.c b/glxwrap.c index 59d3e8e..4b87642 100644 --- a/glxwrap.c +++ b/glxwrap.c @@ -27,6 +27,7 @@ #include #include +#include "context.h" #include "dlwrap.h" #include "glwrap.h" #include "metrics.h" @@ -36,7 +37,11 @@ glXSwapBuffers (Display *dpy, GLXDrawable drawable) { GLWRAP_DEFER (glXSwapBuffers, dpy, drawable); - metrics_end_frame (); + context_counter_stop (); + + context_end_frame (); + + context_counter_start (); } /* glXGetProcAddressARB is a function which accepts a string and @@ -80,10 +85,12 @@ glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx) { Bool ret; - fips_dispatch_init (FIPS_API_GLX); + context_leave (); GLWRAP_DEFER_WITH_RETURN (ret, glXMakeCurrent, dpy, drawable, ctx); + context_enter (FIPS_API_GLX, ctx); + return ret; } @@ -92,9 +99,11 @@ glXMakeContextCurrent (Display *dpy, GLXDrawable drawable, GLXDrawable read, GLX { Bool ret; - fips_dispatch_init (FIPS_API_GLX); + context_leave (); GLWRAP_DEFER_WITH_RETURN (ret, glXMakeContextCurrent, dpy, drawable, read, ctx); + context_enter (FIPS_API_GLX, ctx); + return ret; }