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

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

Issue 179983006: Don't start the SECCOMP sandbox early for Tegra124 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 6 years, 8 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
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 <dwmapi.h> 8 #include <dwmapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 base::TimeDelta collect_context_time; 201 base::TimeDelta collect_context_time;
202 base::TimeDelta initialize_one_off_time; 202 base::TimeDelta initialize_one_off_time;
203 203
204 // Warm up resources that don't need access to GPUInfo. 204 // Warm up resources that don't need access to GPUInfo.
205 if (WarmUpSandbox(command_line)) { 205 if (WarmUpSandbox(command_line)) {
206 #if defined(OS_LINUX) 206 #if defined(OS_LINUX)
207 bool initialized_sandbox = false; 207 bool initialized_sandbox = false;
208 bool initialized_gl_context = false; 208 bool initialized_gl_context = false;
209 bool should_initialize_gl_context = false; 209 bool should_initialize_gl_context = false;
210 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) 210 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
211 // On Chrome OS ARM, GPU driver userspace creates threads when initializing 211 // On Chrome OS ARM Mali, GPU driver userspace creates threads when
212 // a GL context, so start the sandbox early. 212 // initializing a GL context, so start the sandbox early.
213 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(), 213 if (!command_line.HasSwitch(
214 should_initialize_gl_context); 214 switches::kGpuSandboxStartAfterInitialization)) {
215 initialized_sandbox = true; 215 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(),
216 should_initialize_gl_context);
217 initialized_sandbox = true;
218 }
216 #endif 219 #endif
217 #endif // defined(OS_LINUX) 220 #endif // defined(OS_LINUX)
218 221
219 base::TimeTicks before_initialize_one_off = base::TimeTicks::Now(); 222 base::TimeTicks before_initialize_one_off = base::TimeTicks::Now();
220 223
221 // Determine if we need to initialize GL here or it has already been done. 224 // Determine if we need to initialize GL here or it has already been done.
222 bool gl_already_initialized = false; 225 bool gl_already_initialized = false;
223 #if defined(OS_MACOSX) 226 #if defined(OS_MACOSX)
224 if (!command_line.HasSwitch(switches::kNoSandbox)) { 227 if (!command_line.HasSwitch(switches::kNoSandbox)) {
225 // On Mac, if the sandbox is enabled, then GLSurface::InitializeOneOff() 228 // On Mac, if the sandbox is enabled, then GLSurface::InitializeOneOff()
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 return true; 441 return true;
439 } 442 }
440 443
441 return false; 444 return false;
442 } 445 }
443 #endif // defined(OS_WIN) 446 #endif // defined(OS_WIN)
444 447
445 } // namespace. 448 } // namespace.
446 449
447 } // namespace content 450 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698