Make ShaderTranslatorCache per thread refcounted
After crbug.com/332146 is fixed, in Android WebView, GLES2Decoder can be
used on two threads. Make sure a ShaderTranslatorCache instance is only
used on a single thread by refcounting an instance between all decoders.
Also protect ShInitialize by using the thread safety guarantees of
LazyInstance.
For tests, a new instance of ShaderTranslatorCache is passed for each
ContextGroup.
BUG=
Review URL: https://codereview.chromium.org/217813004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261427 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 03cef9bf3062048da19b0d31645d3e6956a50a0a
1 file changed