| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 gpu_info.driver_vendor == "NVIDIA") || | 338 gpu_info.driver_vendor == "NVIDIA") || |
| 339 gpu_info.optimus; | 339 gpu_info.optimus; |
| 340 if (uses_nvidia_driver && should_initialize_gl_context) { | 340 if (uses_nvidia_driver && should_initialize_gl_context) { |
| 341 // We need this on Nvidia to pre-open /dev/nvidiactl and /dev/nvidia0. | 341 // We need this on Nvidia to pre-open /dev/nvidiactl and /dev/nvidia0. |
| 342 CreateDummyGlContext(); | 342 CreateDummyGlContext(); |
| 343 } | 343 } |
| 344 #endif | 344 #endif |
| 345 | 345 |
| 346 #if defined(OS_WIN) | 346 #if defined(OS_WIN) |
| 347 { | 347 { |
| 348 TRACE_EVENT0("gpu", "Initialize COM"); |
| 349 base::win::ScopedCOMInitializer com_initializer; |
| 350 } |
| 351 |
| 352 { |
| 348 TRACE_EVENT0("gpu", "Preload setupapi.dll"); | 353 TRACE_EVENT0("gpu", "Preload setupapi.dll"); |
| 349 // Preload this DLL because the sandbox prevents it from loading. | 354 // Preload this DLL because the sandbox prevents it from loading. |
| 350 LoadLibrary(L"setupapi.dll"); | 355 LoadLibrary(L"setupapi.dll"); |
| 351 } | 356 } |
| 352 | 357 |
| 353 { | 358 { |
| 354 TRACE_EVENT0("gpu", "Initialize DXVA"); | 359 TRACE_EVENT0("gpu", "Initialize DXVA"); |
| 355 // Initialize H/W video decoding stuff which fails in the sandbox. | 360 // Initialize H/W video decoding stuff which fails in the sandbox. |
| 356 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); | 361 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
| 357 } | 362 } |
| 358 #endif | 363 #endif |
| 359 } | 364 } |
| 360 | 365 |
| 361 } // namespace. | 366 } // namespace. |
| 362 | 367 |
| 363 } // namespace content | 368 } // namespace content |
| OLD | NEW |