| 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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/memory_pressure_monitor.h" | 10 #include "base/memory/memory_pressure_monitor.h" |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 size_t process_limit; | 462 size_t process_limit; |
| 463 if (base::StringToSizeT(limit_string, &process_limit)) { | 463 if (base::StringToSizeT(limit_string, &process_limit)) { |
| 464 RenderProcessHost::SetMaxRendererProcessCount(process_limit); | 464 RenderProcessHost::SetMaxRendererProcessCount(process_limit); |
| 465 } | 465 } |
| 466 } | 466 } |
| 467 #endif // !defined(OS_IOS) | 467 #endif // !defined(OS_IOS) |
| 468 | 468 |
| 469 if (parsed_command_line_.HasSwitch(switches::kEnableNativeGpuMemoryBuffers)) { | 469 if (parsed_command_line_.HasSwitch(switches::kEnableNativeGpuMemoryBuffers)) { |
| 470 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( | 470 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( |
| 471 gfx::GpuMemoryBuffer::MAP); | 471 gfx::GpuMemoryBuffer::MAP); |
| 472 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( |
| 473 gfx::GpuMemoryBuffer::PERSISTENT_MAP); |
| 472 } | 474 } |
| 473 | 475 |
| 474 #if defined(USE_OZONE) | 476 #if defined(USE_OZONE) |
| 475 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( | 477 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( |
| 476 gfx::GpuMemoryBuffer::SCANOUT); | 478 gfx::GpuMemoryBuffer::SCANOUT); |
| 477 #endif | 479 #endif |
| 478 | 480 |
| 479 base::DiscardableMemoryAllocator::SetInstance( | 481 base::DiscardableMemoryAllocator::SetInstance( |
| 480 HostDiscardableSharedMemoryManager::current()); | 482 HostDiscardableSharedMemoryManager::current()); |
| 481 | 483 |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 | 1329 |
| 1328 void BrowserMainLoop::EndStartupTracing() { | 1330 void BrowserMainLoop::EndStartupTracing() { |
| 1329 is_tracing_startup_ = false; | 1331 is_tracing_startup_ = false; |
| 1330 TracingController::GetInstance()->DisableRecording( | 1332 TracingController::GetInstance()->DisableRecording( |
| 1331 TracingController::CreateFileSink( | 1333 TracingController::CreateFileSink( |
| 1332 startup_trace_file_, | 1334 startup_trace_file_, |
| 1333 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1335 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1334 } | 1336 } |
| 1335 | 1337 |
| 1336 } // namespace content | 1338 } // namespace content |
| OLD | NEW |