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 (!command_line.HasSwitch(switches::kSkipGpuFullInfoCollection)) { | 184 if (!gpu_info_collector::CollectContextGraphicsInfo(&gpu_info)) |
185 if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) | 185 VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed"; |
186 VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed"; | 186 GetContentClient()->SetGpuInfo(gpu_info); |
187 GetContentClient()->SetGpuInfo(gpu_info); | |
188 | 187 |
189 // We know that CollectGraphicsInfo will initialize a GLContext. | 188 // We know that CollectGraphicsInfo will initialize a GLContext. |
190 initialized_gl_context = true; | 189 initialized_gl_context = true; |
191 } | |
192 | 190 |
193 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 191 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
194 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA | 192 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA |
195 gpu_info.driver_vendor == "NVIDIA") { | 193 gpu_info.driver_vendor == "NVIDIA") { |
196 base::ThreadRestrictions::AssertIOAllowed(); | 194 base::ThreadRestrictions::AssertIOAllowed(); |
197 if (access("/dev/nvidiactl", R_OK) != 0) { | 195 if (access("/dev/nvidiactl", R_OK) != 0) { |
198 VLOG(1) << "NVIDIA device file /dev/nvidiactl access denied"; | 196 VLOG(1) << "NVIDIA device file /dev/nvidiactl access denied"; |
199 gpu_info.gpu_accessible = false; | 197 gpu_info.gpu_accessible = false; |
200 dead_on_arrival = true; | 198 dead_on_arrival = true; |
201 } | 199 } |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 356 |
359 #if defined(OS_WIN) | 357 #if defined(OS_WIN) |
360 // Preload these DLL because the sandbox prevents them from loading. | 358 // Preload these DLL because the sandbox prevents them from loading. |
361 LoadLibrary(L"setupapi.dll"); | 359 LoadLibrary(L"setupapi.dll"); |
362 #endif | 360 #endif |
363 } | 361 } |
364 | 362 |
365 } // namespace. | 363 } // namespace. |
366 | 364 |
367 } // namespace content | 365 } // namespace content |
OLD | NEW |