Commit 12d25209 authored by shouqun's avatar shouqun Committed by Commit bot

[Android WebView] Fix the startup sequence for in-process mode.

The GpuDataManager should be initialized before SetRunRendererInProcess to ensure
the gpu features/blacklists are correctly set for renderer.

BUG=468150

Review URL: https://codereview.chromium.org/1015633003

Cr-Commit-Position: refs/heads/master@{#321258}
parent 9c09b08c
......@@ -614,13 +614,6 @@ int BrowserMainLoop::PreCreateThreads() {
}
#endif
#if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID))
// Single-process is an unsupported and not fully tested mode, so
// don't enable it for official Chrome builds (except on Android).
if (parsed_command_line_.HasSwitch(switches::kSingleProcess))
RenderProcessHost::SetRunRendererInProcess(true);
#endif
// Need to initialize in-process GpuDataManager before creating threads.
// It's unsafe to append the gpu command line switches to the global
// CommandLine::ForCurrentProcess object after threads are created.
......@@ -640,6 +633,13 @@ int BrowserMainLoop::PreCreateThreads() {
GpuDataManagerImpl::GetInstance()->Initialize();
}
#if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID))
// Single-process is an unsupported and not fully tested mode, so
// don't enable it for official Chrome builds (except on Android).
if (parsed_command_line_.HasSwitch(switches::kSingleProcess))
RenderProcessHost::SetRunRendererInProcess(true);
#endif
return 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