Chromium Code Reviews| 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 <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 Loading... | |
| 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)) { |
|
Jorge Lucangeli Obes
2014/03/26 17:15:11
I think the correct indentation here is four space
davidung
2014/03/26 22:19:14
ugh, it's 5 spaces after running 'clang-format'
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |