Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Side by Side Diff: content/gpu/gpu_main.cc

Issue 10836098: Revert 150007 - Only dlopen() OMX/VAAPI libs in the GPU process, and only lazily dlsym() their symb… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/media/video_decode_accelerator_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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"
37 #endif 33 #endif
38 34
39 #if defined(USE_X11) 35 #if defined(USE_X11)
40 #include "ui/base/x/x11_util.h" 36 #include "ui/base/x/x11_util.h"
41 #endif 37 #endif
42 38
43 #if defined(OS_LINUX) 39 #if defined(OS_LINUX)
44 #include "content/public/common/sandbox_init.h" 40 #include "content/public/common/sandbox_init.h"
45 #endif 41 #endif
46 42
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 unsigned char key = '\0'; 142 unsigned char key = '\0';
147 bool ret = hmac.Init(&key, sizeof(key)); 143 bool ret = hmac.Init(&key, sizeof(key));
148 (void) ret; 144 (void) ret;
149 } 145 }
150 146
151 #if defined(OS_LINUX) 147 #if defined(OS_LINUX)
152 { 148 {
153 TRACE_EVENT0("gpu", "Initialize sandbox"); 149 TRACE_EVENT0("gpu", "Initialize sandbox");
154 bool do_init_sandbox = true; 150 bool do_init_sandbox = true;
155 151
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
162 #if defined(OS_CHROMEOS) && defined(NDEBUG) 152 #if defined(OS_CHROMEOS) && defined(NDEBUG)
163 // On Chrome OS and when not on a debug build, initialize 153 // On Chrome OS and when not on a debug build, initialize
164 // the GPU process' sandbox only for Intel GPUs. 154 // the GPU process' sandbox only for Intel GPUs.
165 do_init_sandbox = gpu_info.gpu.vendor_id == 0x8086; // Intel GPU. 155 do_init_sandbox = gpu_info.gpu.vendor_id == 0x8086; // Intel GPU.
166 #endif 156 #endif
167 157
168 if (do_init_sandbox) { 158 if (do_init_sandbox) {
169 content::InitializeSandbox(); 159 content::InitializeSandbox();
170 } 160 }
171 } 161 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 218
229 { 219 {
230 TRACE_EVENT0("gpu", "Run Message Loop"); 220 TRACE_EVENT0("gpu", "Run Message Loop");
231 main_message_loop.Run(); 221 main_message_loop.Run();
232 } 222 }
233 223
234 child_thread->StopWatchdog(); 224 child_thread->StopWatchdog();
235 225
236 return 0; 226 return 0;
237 } 227 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/video_decode_accelerator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698