Chromium Code Reviews| Index: content/gpu/gpu_main.cc |
| =================================================================== |
| --- content/gpu/gpu_main.cc (revision 160744) |
| +++ content/gpu/gpu_main.cc (working copy) |
| @@ -48,9 +48,6 @@ |
| namespace { |
| void WarmUpSandbox(const content::GPUInfo&, bool); |
| -#if defined(OS_LINUX) |
| -void CollectGraphicsInfo(content::GPUInfo*); |
| -#endif |
| } |
| // Main function for starting the Gpu process. |
| @@ -122,14 +119,11 @@ |
| bool initialized_gl_context = false; |
| // Load and initialize the GL implementation and locate the GL entry points. |
| if (gfx::GLSurface::InitializeOneOff()) { |
| -#if defined(OS_LINUX) |
| - // We collect full GPU info on demand in Win/Mac, i.e., when about:gpu |
| - // page opens. This is because we can make blacklist decisions based on |
| - // preliminary GPU info. |
| - // However, on Linux, we may not have enough info for blacklisting. |
| - if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id || |
| - gpu_info.driver_vendor.empty() || gpu_info.driver_version.empty()) { |
| - CollectGraphicsInfo(&gpu_info); |
| + if (!command_line.HasSwitch(switches::kSkipGpuFullInfoCollection)) { |
| + if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) |
| + VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed"; |
| + content::GetContentClient()->SetGpuInfo(gpu_info); |
| + |
| // We know that CollectGraphicsInfo will initialize a GLContext. |
| initialized_gl_context = true; |
|
Ken Russell (switch to Gerrit)
2012/10/09 18:52:55
Now CollectGraphicsInfo might have failed above, s
Zhenyao Mo
2012/10/09 19:20:47
For this we need to evaluate the effects of this v
|
| } |
| @@ -145,7 +139,6 @@ |
| } |
| } |
| #endif // OS_CHROMEOS |
| -#endif // OS_LINUX |
| } else { |
| VLOG(1) << "gfx::GLSurface::InitializeOneOff failed"; |
| gpu_info.gpu_accessible = false; |
| @@ -313,13 +306,5 @@ |
| #endif |
| } |
| -#if defined(OS_LINUX) |
| -void CollectGraphicsInfo(content::GPUInfo* gpu_info) { |
| - if (!gpu_info_collector::CollectGraphicsInfo(gpu_info)) |
| - VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed"; |
| - content::GetContentClient()->SetGpuInfo(*gpu_info); |
| -} |
| -#endif |
| - |
| } // namespace. |