Refactor of GrGLCaps to move some code around.

The big changes here are that in initConfigTable we were setting a few
member variables (srgb support and compression related) whereas all other
member variables were set elsewhere. So this change moves the logic out
of initConfigTable and places it with other similar code.

Next setting of fSRGBWriteControl was affected by a driver workaround. We
need to apply this workaround before calling the initConfigTable. Thus I
moved the call to applyDriverWorkarounds above the initConfigTable. The
end result is that by the time initConfigTable is called we've now made all
decisions about what we will enable and disable (in terms of member variables),
and the only values writted in the function is setting values of the ConfigTable
itself.

Change-Id: I65b1bb4e9fc49d6020e1eb58d838f47057e6d1c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224191
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
3 files changed