Previously, we ran timer queries only around gl calls that we
determined were "drawing operations". This had the following
drawbacks:
1. Lots of timer queries, so more overhead than desired
2. Misses accumulating time from non "drawing operations"
3. Misses accumulating time from drawing operations we failed to
identify.
Here, instead, we keep the timer running continuously, solving all
three of the above problems. We first start timer at make-current time
(glxMakeCurrent, glxMakeContextCurrent, or eglMakeCurrent), and only
stop it, (and immediately restart it), in one of the following
circumstances:
1. Current program changed (glUseProgram or glUseProgramObjectARB)
2. At each frame end (glxSwapBuffers or eglSwapBuffers)