Use glReadPixels much less often.

This change brings a dramatic speedup in benchmarks.