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 17 matching lines...) Expand all Loading... |
28 #include "ui/gl/gl_implementation.h" | 28 #include "ui/gl/gl_implementation.h" |
29 #include "ui/gl/gl_surface.h" | 29 #include "ui/gl/gl_surface.h" |
30 #include "ui/gl/gl_switches.h" | 30 #include "ui/gl/gl_switches.h" |
31 #include "ui/gl/gpu_switching_manager.h" | 31 #include "ui/gl/gpu_switching_manager.h" |
32 | 32 |
33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
34 #include "base/win/scoped_com_initializer.h" | 34 #include "base/win/scoped_com_initializer.h" |
35 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 35 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
36 #include "sandbox/win/src/sandbox.h" | 36 #include "sandbox/win/src/sandbox.h" |
37 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 37 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
| 38 #include "content/common/gpu/media/exynos_video_decode_accelerator.h" |
38 #include "content/common/gpu/media/omx_video_decode_accelerator.h" | 39 #include "content/common/gpu/media/omx_video_decode_accelerator.h" |
39 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 40 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
40 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 41 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
41 #endif | 42 #endif |
42 | 43 |
43 #if defined(USE_X11) | 44 #if defined(USE_X11) |
44 #include "ui/base/x/x11_util.h" | 45 #include "ui/base/x/x11_util.h" |
45 #endif | 46 #endif |
46 | 47 |
47 #if defined(OS_LINUX) | 48 #if defined(OS_LINUX) |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 TRACE_EVENT0("gpu", "Warm up HMAC"); | 302 TRACE_EVENT0("gpu", "Warm up HMAC"); |
302 // Warm up the crypto subsystem, which needs to done pre-sandbox on all | 303 // Warm up the crypto subsystem, which needs to done pre-sandbox on all |
303 // platforms. | 304 // platforms. |
304 crypto::HMAC hmac(crypto::HMAC::SHA256); | 305 crypto::HMAC hmac(crypto::HMAC::SHA256); |
305 unsigned char key = '\0'; | 306 unsigned char key = '\0'; |
306 bool ret = hmac.Init(&key, sizeof(key)); | 307 bool ret = hmac.Init(&key, sizeof(key)); |
307 (void) ret; | 308 (void) ret; |
308 } | 309 } |
309 | 310 |
310 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 311 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
311 OmxVideoDecodeAccelerator::PreSandboxInitialization(); | 312 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda)) |
| 313 ExynosVideoDecodeAccelerator::PreSandboxInitialization(); |
| 314 else |
| 315 OmxVideoDecodeAccelerator::PreSandboxInitialization(); |
312 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 316 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
313 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); | 317 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); |
314 #endif | 318 #endif |
315 | 319 |
316 #if defined(OS_LINUX) | 320 #if defined(OS_LINUX) |
317 // We special case Optimus since the vendor_id we see may not be Nvidia. | 321 // We special case Optimus since the vendor_id we see may not be Nvidia. |
318 bool uses_nvidia_driver = (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA. | 322 bool uses_nvidia_driver = (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA. |
319 gpu_info.driver_vendor == "NVIDIA") || | 323 gpu_info.driver_vendor == "NVIDIA") || |
320 gpu_info.optimus; | 324 gpu_info.optimus; |
321 if (uses_nvidia_driver && should_initialize_gl_context) { | 325 if (uses_nvidia_driver && should_initialize_gl_context) { |
(...skipping 18 matching lines...) Expand all Loading... |
340 TRACE_EVENT0("gpu", "Initialize DXVA"); | 344 TRACE_EVENT0("gpu", "Initialize DXVA"); |
341 // Initialize H/W video decoding stuff which fails in the sandbox. | 345 // Initialize H/W video decoding stuff which fails in the sandbox. |
342 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); | 346 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
343 } | 347 } |
344 #endif | 348 #endif |
345 } | 349 } |
346 | 350 |
347 } // namespace. | 351 } // namespace. |
348 | 352 |
349 } // namespace content | 353 } // namespace content |
OLD | NEW |