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 { | |
353 TRACE_EVENT0("gpu", "Preload setupapi.dll"); | 348 TRACE_EVENT0("gpu", "Preload setupapi.dll"); |
354 // Preload this DLL because the sandbox prevents it from loading. | 349 // Preload this DLL because the sandbox prevents it from loading. |
355 LoadLibrary(L"setupapi.dll"); | 350 LoadLibrary(L"setupapi.dll"); |
356 } | 351 } |
357 | 352 |
358 { | 353 { |
359 TRACE_EVENT0("gpu", "Initialize DXVA"); | 354 TRACE_EVENT0("gpu", "Initialize DXVA"); |
360 // Initialize H/W video decoding stuff which fails in the sandbox. | 355 // Initialize H/W video decoding stuff which fails in the sandbox. |
361 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); | 356 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
362 } | 357 } |
363 #endif | 358 #endif |
364 } | 359 } |
365 | 360 |
366 } // namespace. | 361 } // namespace. |
367 | 362 |
368 } // namespace content | 363 } // namespace content |
OLD | NEW |