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 16 matching lines...) Expand all Loading... | |
27 #include "ui/gl/gl_surface.h" | 27 #include "ui/gl/gl_surface.h" |
28 #include "ui/gl/gl_switches.h" | 28 #include "ui/gl/gl_switches.h" |
29 #include "ui/gl/gpu_switching_manager.h" | 29 #include "ui/gl/gpu_switching_manager.h" |
30 | 30 |
31 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
32 #include "base/win/scoped_com_initializer.h" | 32 #include "base/win/scoped_com_initializer.h" |
33 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 33 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
34 #include "sandbox/win/src/sandbox.h" | 34 #include "sandbox/win/src/sandbox.h" |
35 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 35 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
36 #include "content/common/gpu/media/omx_video_decode_accelerator.h" | 36 #include "content/common/gpu/media/omx_video_decode_accelerator.h" |
37 #include "content/common/gpu/media/exynos_video_decode_accelerator.h" | |
Ami GONE FROM CHROMIUM
2012/10/31 01:06:50
above prev line
sheu
2012/11/01 02:16:08
Done.
| |
37 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 38 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
38 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 39 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
39 #endif | 40 #endif |
40 | 41 |
41 #if defined(USE_X11) | 42 #if defined(USE_X11) |
42 #include "ui/base/x/x11_util.h" | 43 #include "ui/base/x/x11_util.h" |
43 #endif | 44 #endif |
44 | 45 |
45 #if defined(OS_LINUX) | 46 #if defined(OS_LINUX) |
46 #include "content/public/common/sandbox_init.h" | 47 #include "content/public/common/sandbox_init.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
264 TRACE_EVENT0("gpu", "Warm up HMAC"); | 265 TRACE_EVENT0("gpu", "Warm up HMAC"); |
265 // Warm up the crypto subsystem, which needs to done pre-sandbox on all | 266 // Warm up the crypto subsystem, which needs to done pre-sandbox on all |
266 // platforms. | 267 // platforms. |
267 crypto::HMAC hmac(crypto::HMAC::SHA256); | 268 crypto::HMAC hmac(crypto::HMAC::SHA256); |
268 unsigned char key = '\0'; | 269 unsigned char key = '\0'; |
269 bool ret = hmac.Init(&key, sizeof(key)); | 270 bool ret = hmac.Init(&key, sizeof(key)); |
270 (void) ret; | 271 (void) ret; |
271 } | 272 } |
272 | 273 |
273 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 274 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
274 OmxVideoDecodeAccelerator::PreSandboxInitialization(); | 275 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda)) |
276 ExynosVideoDecodeAccelerator::PreSandboxInitialization(); | |
277 else | |
278 OmxVideoDecodeAccelerator::PreSandboxInitialization(); | |
275 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 279 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
276 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); | 280 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); |
277 #endif | 281 #endif |
278 | 282 |
279 #if defined(OS_LINUX) | 283 #if defined(OS_LINUX) |
280 // We special case Optimus since the vendor_id we see may not be Nvidia. | 284 // We special case Optimus since the vendor_id we see may not be Nvidia. |
281 bool uses_nvidia_driver = (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA. | 285 bool uses_nvidia_driver = (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA. |
282 gpu_info.driver_vendor == "NVIDIA") || | 286 gpu_info.driver_vendor == "NVIDIA") || |
283 gpu_info.optimus; | 287 gpu_info.optimus; |
284 if (uses_nvidia_driver && should_initialize_gl_context) { | 288 if (uses_nvidia_driver && should_initialize_gl_context) { |
(...skipping 18 matching lines...) Expand all Loading... | |
303 TRACE_EVENT0("gpu", "Initialize DXVA"); | 307 TRACE_EVENT0("gpu", "Initialize DXVA"); |
304 // Initialize H/W video decoding stuff which fails in the sandbox. | 308 // Initialize H/W video decoding stuff which fails in the sandbox. |
305 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); | 309 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
306 } | 310 } |
307 #endif | 311 #endif |
308 } | 312 } |
309 | 313 |
310 } // namespace. | 314 } // namespace. |
311 | 315 |
312 } // namespace content | 316 } // namespace content |
OLD | NEW |