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
tree: 5f34c8e6347da1369e3585b34044f81c3a8c4dce
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. ipc/
  6. mojo/
  7. testing/
  8. third_party/
  9. ui/