summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--content/gpu/gpu_child_thread.cc17
2 files changed, 15 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index cfca2c8..5fb948d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -169,6 +169,7 @@ Aaron Randolph <aaron.randolph@gmail.com>
Yumikiyo Osanai <yumios.art@gmail.com>
Matthew Robertson <matthewrobertson03@gmail.com>
Mao Yujie <yujie.mao@intel.com>
+Jin Yang <jin.a.yang@intel.com>
Xinchao He <hexinchao@gmail.com>
Stephen Searles <stephen.searles@gmail.com>
Arun Mankuzhi <arun.m@samsung.com>
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 2fd64c2..76f482e 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -65,6 +65,14 @@ GpuChildThread::GpuChildThread(const std::string& channel_id)
target_services_ = NULL;
collecting_dx_diagnostics_ = false;
#endif
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU)) {
+ // For single process and in-process GPU mode, we need to load and
+ // initialize the GL implementation and locate the GL entry points here.
+ if (!gfx::GLSurface::InitializeOneOff()) {
+ VLOG(1) << "gfx::GLSurface::InitializeOneOff()";
+ }
+ }
}
@@ -176,9 +184,12 @@ void GpuChildThread::StopWatchdog() {
void GpuChildThread::OnCollectGraphicsInfo() {
if (!gpu_info_.finalized &&
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableGpuSandbox)) {
- // GPU full info collection should only happen on un-sandboxed GPU process.
+ (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableGpuSandbox) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU))) {
+ // GPU full info collection should only happen on un-sandboxed GPU process
+ // or single process/in-process gpu mode.
if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info_))
VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed";