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" | |
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 // Warm up the crypto subsystem, which needs to done pre-sandbox on all | 265 // Warm up the crypto subsystem, which needs to done pre-sandbox on all |
265 // platforms. | 266 // platforms. |
266 crypto::HMAC hmac(crypto::HMAC::SHA256); | 267 crypto::HMAC hmac(crypto::HMAC::SHA256); |
267 unsigned char key = '\0'; | 268 unsigned char key = '\0'; |
268 bool ret = hmac.Init(&key, sizeof(key)); | 269 bool ret = hmac.Init(&key, sizeof(key)); |
269 (void) ret; | 270 (void) ret; |
270 } | 271 } |
271 | 272 |
272 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 273 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
273 OmxVideoDecodeAccelerator::PreSandboxInitialization(); | 274 OmxVideoDecodeAccelerator::PreSandboxInitialization(); |
275 ExynosVideoDecodeAccelerator::PreSandboxInitialization(); | |
Ami GONE FROM CHROMIUM
2012/10/18 08:30:26
we should only load the relevant .so's.
sheu
2012/10/30 09:05:03
Done.
| |
274 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 276 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
275 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); | 277 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); |
276 #endif | 278 #endif |
277 | 279 |
278 #if defined(OS_LINUX) | 280 #if defined(OS_LINUX) |
279 // We special case Optimus since the vendor_id we see may not be Nvidia. | 281 // We special case Optimus since the vendor_id we see may not be Nvidia. |
280 bool uses_nvidia_driver = (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA. | 282 bool uses_nvidia_driver = (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA. |
281 gpu_info.driver_vendor == "NVIDIA") || | 283 gpu_info.driver_vendor == "NVIDIA") || |
282 gpu_info.optimus; | 284 gpu_info.optimus; |
283 if (uses_nvidia_driver && should_initialize_gl_context) { | 285 if (uses_nvidia_driver && should_initialize_gl_context) { |
(...skipping 17 matching lines...) Expand all Loading... | |
301 { | 303 { |
302 TRACE_EVENT0("gpu", "Initialize DXVA"); | 304 TRACE_EVENT0("gpu", "Initialize DXVA"); |
303 // Initialize H/W video decoding stuff which fails in the sandbox. | 305 // Initialize H/W video decoding stuff which fails in the sandbox. |
304 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); | 306 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
305 } | 307 } |
306 #endif | 308 #endif |
307 } | 309 } |
308 | 310 |
309 } // namespace. | 311 } // namespace. |
310 | 312 |
OLD | NEW |