OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 base::WaitableEvent dxva_initialized(true, false); | 174 base::WaitableEvent dxva_initialized(true, false); |
175 DXVAVideoDecodeAccelerator::PreSandboxInitialization( | 175 DXVAVideoDecodeAccelerator::PreSandboxInitialization( |
176 base::Bind(&base::WaitableEvent::Signal, | 176 base::Bind(&base::WaitableEvent::Signal, |
177 base::Unretained(&dxva_initialized))); | 177 base::Unretained(&dxva_initialized))); |
178 #endif | 178 #endif |
179 | 179 |
180 // We need to track that information for the WarmUpSandbox function. | 180 // We need to track that information for the WarmUpSandbox function. |
181 bool initialized_gl_context = false; | 181 bool initialized_gl_context = false; |
182 // Load and initialize the GL implementation and locate the GL entry points. | 182 // Load and initialize the GL implementation and locate the GL entry points. |
183 if (gfx::GLSurface::InitializeOneOff()) { | 183 if (gfx::GLSurface::InitializeOneOff()) { |
184 if (!gpu_info_collector::CollectContextGraphicsInfo(&gpu_info)) | 184 if (!command_line.HasSwitch(switches::kSkipGpuFullInfoCollection)) { |
185 VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed"; | 185 if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) |
186 GetContentClient()->SetGpuInfo(gpu_info); | 186 VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed"; |
| 187 GetContentClient()->SetGpuInfo(gpu_info); |
187 | 188 |
188 // We know that CollectGraphicsInfo will initialize a GLContext. | 189 // We know that CollectGraphicsInfo will initialize a GLContext. |
189 initialized_gl_context = true; | 190 initialized_gl_context = true; |
| 191 } |
190 | 192 |
191 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 193 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
192 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA | 194 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA |
193 gpu_info.driver_vendor == "NVIDIA") { | 195 gpu_info.driver_vendor == "NVIDIA") { |
194 base::ThreadRestrictions::AssertIOAllowed(); | 196 base::ThreadRestrictions::AssertIOAllowed(); |
195 if (access("/dev/nvidiactl", R_OK) != 0) { | 197 if (access("/dev/nvidiactl", R_OK) != 0) { |
196 VLOG(1) << "NVIDIA device file /dev/nvidiactl access denied"; | 198 VLOG(1) << "NVIDIA device file /dev/nvidiactl access denied"; |
197 gpu_info.gpu_accessible = false; | 199 gpu_info.gpu_accessible = false; |
198 dead_on_arrival = true; | 200 dead_on_arrival = true; |
199 } | 201 } |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 358 |
357 #if defined(OS_WIN) | 359 #if defined(OS_WIN) |
358 // Preload these DLL because the sandbox prevents them from loading. | 360 // Preload these DLL because the sandbox prevents them from loading. |
359 LoadLibrary(L"setupapi.dll"); | 361 LoadLibrary(L"setupapi.dll"); |
360 #endif | 362 #endif |
361 } | 363 } |
362 | 364 |
363 } // namespace. | 365 } // namespace. |
364 | 366 |
365 } // namespace content | 367 } // namespace content |
OLD | NEW |