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 12 matching lines...) Expand all Loading... |
23 #include "content/public/common/content_client.h" | 23 #include "content/public/common/content_client.h" |
24 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
25 #include "content/public/common/main_function_params.h" | 25 #include "content/public/common/main_function_params.h" |
26 #include "crypto/hmac.h" | 26 #include "crypto/hmac.h" |
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 | 29 |
30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
31 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 31 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
32 #include "sandbox/win/src/sandbox.h" | 32 #include "sandbox/win/src/sandbox.h" |
| 33 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
| 34 #include "content/common/gpu/media/omx_video_decode_accelerator.h" |
| 35 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| 36 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
33 #endif | 37 #endif |
34 | 38 |
35 #if defined(USE_X11) | 39 #if defined(USE_X11) |
36 #include "ui/base/x/x11_util.h" | 40 #include "ui/base/x/x11_util.h" |
37 #endif | 41 #endif |
38 | 42 |
39 #if defined(OS_LINUX) | 43 #if defined(OS_LINUX) |
40 #include "content/public/common/sandbox_init.h" | 44 #include "content/public/common/sandbox_init.h" |
41 #endif | 45 #endif |
42 | 46 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 unsigned char key = '\0'; | 146 unsigned char key = '\0'; |
143 bool ret = hmac.Init(&key, sizeof(key)); | 147 bool ret = hmac.Init(&key, sizeof(key)); |
144 (void) ret; | 148 (void) ret; |
145 } | 149 } |
146 | 150 |
147 #if defined(OS_LINUX) | 151 #if defined(OS_LINUX) |
148 { | 152 { |
149 TRACE_EVENT0("gpu", "Initialize sandbox"); | 153 TRACE_EVENT0("gpu", "Initialize sandbox"); |
150 bool do_init_sandbox = true; | 154 bool do_init_sandbox = true; |
151 | 155 |
| 156 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
| 157 OmxVideoDecodeAccelerator::PreSandboxInitialization(); |
| 158 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| 159 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); |
| 160 #endif |
| 161 |
152 #if defined(OS_CHROMEOS) && defined(NDEBUG) | 162 #if defined(OS_CHROMEOS) && defined(NDEBUG) |
153 // On Chrome OS and when not on a debug build, initialize | 163 // On Chrome OS and when not on a debug build, initialize |
154 // the GPU process' sandbox only for Intel GPUs. | 164 // the GPU process' sandbox only for Intel GPUs. |
155 do_init_sandbox = gpu_info.gpu.vendor_id == 0x8086; // Intel GPU. | 165 do_init_sandbox = gpu_info.gpu.vendor_id == 0x8086; // Intel GPU. |
156 #endif | 166 #endif |
157 | 167 |
158 if (do_init_sandbox) { | 168 if (do_init_sandbox) { |
159 content::InitializeSandbox(); | 169 content::InitializeSandbox(); |
160 } | 170 } |
161 } | 171 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 228 |
219 { | 229 { |
220 TRACE_EVENT0("gpu", "Run Message Loop"); | 230 TRACE_EVENT0("gpu", "Run Message Loop"); |
221 main_message_loop.Run(); | 231 main_message_loop.Run(); |
222 } | 232 } |
223 | 233 |
224 child_thread->StopWatchdog(); | 234 child_thread->StopWatchdog(); |
225 | 235 |
226 return 0; | 236 return 0; |
227 } | 237 } |
OLD | NEW |