Currently, there is a requirement to call GrContext::resetContext(...)
whenever the gl interface is used directly and the gl state is changed without skia's knowledge.
This way of doing things is very error prone and often results in flaky failures with esoteric repro steps. The resulting bugs are often very hard to bisect due to flaky repro, and hard to investigate.
What we need is a systematic approach to either:
a) automatically detect out of sync state,
b) automatically invalidate the GrContext when state-changing GL calls are made, or
c) automatically update skia's state cache
Comment 1 by junov@chromium.org
, Feb 7 2018