| Index: gpu/ipc/service/gpu_init.cc
|
| diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
|
| index 020f414388b48a1c51cba95ea39001a4328d4f5e..4b48566f2cb744f94a4ce97bd481a181e1abb9b6 100644
|
| --- a/gpu/ipc/service/gpu_init.cc
|
| +++ b/gpu/ipc/service/gpu_init.cc
|
| @@ -84,7 +84,6 @@ void GetGpuInfoFromCommandLine(gpu::GPUInfo& gpu_info,
|
| }
|
| }
|
|
|
| -#if !defined(OS_MACOSX)
|
| void CollectGraphicsInfo(gpu::GPUInfo& gpu_info) {
|
| TRACE_EVENT0("gpu,startup", "Collect Graphics Info");
|
|
|
| @@ -111,7 +110,6 @@ void CollectGraphicsInfo(gpu::GPUInfo& gpu_info) {
|
| }
|
| #endif // defined(OS_WIN)
|
| }
|
| -#endif // defined(OS_MACOSX)
|
|
|
| #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
| bool CanAccessNvidiaDeviceFile() {
|
| @@ -236,24 +234,29 @@ bool GpuInit::InitializeAndStartSandbox(const base::CommandLine& command_line) {
|
| // By skipping the following code on Mac, we don't really lose anything,
|
| // because the basic GPU information is passed down from the host process.
|
| base::TimeTicks before_collect_context_graphics_info = base::TimeTicks::Now();
|
| -#if !defined(OS_MACOSX)
|
| - CollectGraphicsInfo(gpu_info_);
|
| - if (gpu_info_.context_info_state == gpu::kCollectInfoFatalFailure)
|
| - return false;
|
| -
|
| - // Recompute gpu driver bug workarounds.
|
| - // This is necessary on systems where vendor_id/device_id aren't available
|
| - // (Chrome OS, Android) or where workarounds may be dependent on GL_VENDOR
|
| - // and GL_RENDERER strings which are lazily computed (Linux).
|
| - if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
|
| - // TODO: this can not affect disabled extensions, since they're already
|
| - // initialized in the bindings. This should be moved before bindings
|
| - // initialization. However, populating GPUInfo fully works only on Android.
|
| - // Other platforms would need the bindings to query GL strings.
|
| - gpu::ApplyGpuDriverBugWorkarounds(
|
| - gpu_info_, const_cast<base::CommandLine*>(&command_line));
|
| + bool skipCollectGraphicsInfo = false;
|
| +#if defined(OS_MACOSX)
|
| + if (gpu_info_.gpu.vendor_id == 0x10de) // NVIDIA
|
| + skipCollectGraphicsInfo = true;
|
| +#endif // defined(OS_MACOSX)
|
| + if (!skipCollectGraphicsInfo) {
|
| + CollectGraphicsInfo(gpu_info_);
|
| + if (gpu_info_.context_info_state == gpu::kCollectInfoFatalFailure)
|
| + return false;
|
| +
|
| + // Recompute gpu driver bug workarounds.
|
| + // This is necessary on systems where vendor_id/device_id aren't available
|
| + // (Chrome OS, Android) or where workarounds may be dependent on GL_VENDOR
|
| + // and GL_RENDERER strings which are lazily computed (Linux).
|
| + if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
|
| + // TODO: this can not affect disabled extensions, since they're already
|
| + // initialized in the bindings. This should be moved before bindings
|
| + // initialization. However, populating GPUInfo fully works only on
|
| + // Android. Other platforms would need the bindings to query GL strings.
|
| + gpu::ApplyGpuDriverBugWorkarounds(
|
| + gpu_info_, const_cast<base::CommandLine*>(&command_line));
|
| + }
|
| }
|
| -#endif // !defined(OS_MACOSX)
|
|
|
| gpu_feature_info_ = gpu::GetGpuFeatureInfo(gpu_info_, command_line);
|
|
|
|
|