| Index: android_webview/browser/hardware_renderer.cc
|
| diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
|
| index a45da7ff724231c5775bfc66b33474068a95fe18..6136aeab9af4aa988b0b410093a94130fa56e37f 100644
|
| --- a/android_webview/browser/hardware_renderer.cc
|
| +++ b/android_webview/browser/hardware_renderer.cc
|
| @@ -206,23 +206,22 @@ void HardwareRenderer::CalculateTileMemoryPolicy() {
|
|
|
| namespace internal {
|
|
|
| -bool ScopedAllowGL::allow_gl = false;
|
| +base::LazyInstance<base::ThreadLocalBoolean> ScopedAllowGL::allow_gl;
|
|
|
| // static
|
| bool ScopedAllowGL::IsAllowed() {
|
| - return GLViewRendererManager::GetInstance()->OnRenderThread() && allow_gl;
|
| + return allow_gl.Get().Get();
|
| }
|
|
|
| ScopedAllowGL::ScopedAllowGL() {
|
| - DCHECK(GLViewRendererManager::GetInstance()->OnRenderThread());
|
| - DCHECK(!allow_gl);
|
| - allow_gl = true;
|
| + DCHECK(!allow_gl.Get().Get());
|
| + allow_gl.Get().Set(true);
|
|
|
| if (g_service.Get())
|
| g_service.Get()->RunTasks();
|
| }
|
|
|
| -ScopedAllowGL::~ScopedAllowGL() { allow_gl = false; }
|
| +ScopedAllowGL::~ScopedAllowGL() { allow_gl.Get().Set(false); }
|
|
|
| DeferredGpuCommandService::DeferredGpuCommandService() {}
|
|
|
|
|