Commit 6dcf39e8 authored by Thoren Paulson's avatar Thoren Paulson Committed by Commit Bot

Honor "--skip-gpu-data-loading" in single process.

This flag prevents the collection of gpu info on the multi-process path,
but not on the in-process path. This change makes the in-process path
consistent with the multi-process path.

This is needed by Cast for Android Things, which doesn't always have an
implementation of EGL, so crashes when loading gpu info.

Bug: None
Test: CQ
Change-Id: Ic700fe28c4c3b5af10cf860e76f43facba25d86d
Reviewed-on: https://chromium-review.googlesource.com/596329Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Thoren Paulson <thoren@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491400}
parent 7c97bc65
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
#include "content/gpu/in_process_gpu_thread.h" #include "content/gpu/in_process_gpu_thread.h"
#include "base/command_line.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "content/gpu/gpu_child_thread.h" #include "content/gpu/gpu_child_thread.h"
#include "content/gpu/gpu_process.h" #include "content/gpu/gpu_process.h"
#include "content/public/common/content_switches.h"
#include "gpu/config/gpu_info_collector.h" #include "gpu/config/gpu_info_collector.h"
#include "gpu/config/gpu_util.h" #include "gpu/config/gpu_util.h"
#include "ui/gl/init/gl_factory.h" #include "ui/gl/init/gl_factory.h"
...@@ -53,10 +55,13 @@ void InProcessGpuThread::Init() { ...@@ -53,10 +55,13 @@ void InProcessGpuThread::Init() {
#endif #endif
gpu::GPUInfo gpu_info; gpu::GPUInfo gpu_info;
if (!gl::init::InitializeGLOneOff()) if (!gl::init::InitializeGLOneOff()) {
VLOG(1) << "gl::init::InitializeGLOneOff failed"; VLOG(1) << "gl::init::InitializeGLOneOff failed";
else } else {
gpu::CollectContextGraphicsInfo(&gpu_info); if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSkipGpuDataLoading))
gpu::CollectContextGraphicsInfo(&gpu_info);
}
gpu::GpuFeatureInfo gpu_feature_info = gpu::GpuFeatureInfo gpu_feature_info =
gpu::GetGpuFeatureInfo(gpu_info, *base::CommandLine::ForCurrentProcess()); gpu::GetGpuFeatureInfo(gpu_info, *base::CommandLine::ForCurrentProcess());
......
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