Index: android_webview/browser/deferred_gpu_command_service.cc |
diff --git a/android_webview/browser/deferred_gpu_command_service.cc b/android_webview/browser/deferred_gpu_command_service.cc |
index 601334ae7f923f6860811a76a163ad612ecc4585..ed1cf5731c5e4d0f7916f0c51119072a0cf4fa30 100644 |
--- a/android_webview/browser/deferred_gpu_command_service.cc |
+++ b/android_webview/browser/deferred_gpu_command_service.cc |
@@ -41,6 +41,12 @@ void DeferredGpuCommandService::SetInstance() { |
} |
} |
+// static |
+DeferredGpuCommandService* DeferredGpuCommandService::GetInstance() { |
+ DCHECK(g_service.Get().get()); |
+ return g_service.Get().get(); |
+} |
+ |
DeferredGpuCommandService::DeferredGpuCommandService() {} |
DeferredGpuCommandService::~DeferredGpuCommandService() { |
@@ -68,6 +74,7 @@ void DeferredGpuCommandService::ScheduleTask(const base::Closure& task) { |
if (ScopedAllowGL::IsAllowed()) { |
RunTasks(); |
} else { |
+ // TODO(boliu): Improve this to avoid PostTask storm. |
RequestProcessGLOnUIThread(); |
} |
} |