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

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: Created 6 years, 9 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(switches::kGpuSandboxStartLater)) {
214 should_initialize_gl_context); 214 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(),
215 initialized_sandbox = true; 215 should_initialize_gl_context);
216 initialized_sandbox = true;
217 }
216 #endif 218 #endif
217 #endif // defined(OS_LINUX) 219 #endif // defined(OS_LINUX)
218 220
219 base::TimeTicks before_initialize_one_off = base::TimeTicks::Now(); 221 base::TimeTicks before_initialize_one_off = base::TimeTicks::Now();
220 222
221 // Determine if we need to initialize GL here or it has already been done. 223 // Determine if we need to initialize GL here or it has already been done.
222 bool gl_already_initialized = false; 224 bool gl_already_initialized = false;
223 #if defined(OS_MACOSX) 225 #if defined(OS_MACOSX)
224 if (!command_line.HasSwitch(switches::kNoSandbox)) { 226 if (!command_line.HasSwitch(switches::kNoSandbox)) {
225 // On Mac, if the sandbox is enabled, then GLSurface::InitializeOneOff() 227 // 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; 440 return true;
439 } 441 }
440 442
441 return false; 443 return false;
442 } 444 }
443 #endif // defined(OS_WIN) 445 #endif // defined(OS_WIN)
444 446
445 } // namespace. 447 } // namespace.
446 448
447 } // namespace content 449 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698