Commit 3b1979d1 authored by perryuwang's avatar perryuwang Committed by Commit Bot

Delay creating DeferredGpuCommandService until gpu driver bug list is loaded.

DeferredGpuCommandService is created before gpu driver bug list is loaded,
so GpuDriverBugWorkarounds of DeferredGpuCommandService is empty in WebView.
In order to fix the bug, Delay creating DeferredGpuCommandService until
gpu driver bug list is loaded.

Change-Id: Ie594ad326cb1b3e6970efc007cfd6dfc4a826ebb
Reviewed-on: https://chromium-review.googlesource.com/597375
Commit-Queue: Bo Liu <boliu@chromium.org>
Reviewed-by: default avatarBo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491709}
parent 8078336c
...@@ -120,7 +120,6 @@ int AwBrowserMainParts::PreCreateThreads() { ...@@ -120,7 +120,6 @@ int AwBrowserMainParts::PreCreateThreads() {
base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(
base::android::AttachCurrentThread()); base::android::AttachCurrentThread());
DeferredGpuCommandService::SetInstance();
breakpad::CrashDumpObserver::Create(); breakpad::CrashDumpObserver::Create();
if (crash_reporter::IsCrashReporterEnabled()) { if (crash_reporter::IsCrashReporterEnabled()) {
...@@ -170,6 +169,10 @@ void AwBrowserMainParts::PreMainMessageLoopRun() { ...@@ -170,6 +169,10 @@ void AwBrowserMainParts::PreMainMessageLoopRun() {
// TODO(meacer): Remove when PlzNavigate ships. // TODO(meacer): Remove when PlzNavigate ships.
content::RenderFrameHost::AllowDataUrlNavigationForAndroidWebView(); content::RenderFrameHost::AllowDataUrlNavigationForAndroidWebView();
// This only works because webview uses in-process gpu
// which is not started up early by BrowserMainLoop.
DeferredGpuCommandService::SetInstance();
} }
bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment