| 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); | |
| 474 } | 472 } |
| 475 | 473 |
| 476 #if defined(USE_OZONE) | 474 #if defined(USE_OZONE) |
| 477 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( | 475 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( |
| 478 gfx::GpuMemoryBuffer::SCANOUT); | 476 gfx::GpuMemoryBuffer::SCANOUT); |
| 479 #endif | 477 #endif |
| 480 | 478 |
| 481 base::DiscardableMemoryAllocator::SetInstance( | 479 base::DiscardableMemoryAllocator::SetInstance( |
| 482 HostDiscardableSharedMemoryManager::current()); | 480 HostDiscardableSharedMemoryManager::current()); |
| 483 | 481 |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 | 1327 |
| 1330 void BrowserMainLoop::EndStartupTracing() { | 1328 void BrowserMainLoop::EndStartupTracing() { |
| 1331 is_tracing_startup_ = false; | 1329 is_tracing_startup_ = false; |
| 1332 TracingController::GetInstance()->DisableRecording( | 1330 TracingController::GetInstance()->DisableRecording( |
| 1333 TracingController::CreateFileSink( | 1331 TracingController::CreateFileSink( |
| 1334 startup_trace_file_, | 1332 startup_trace_file_, |
| 1335 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1333 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1336 } | 1334 } |
| 1337 | 1335 |
| 1338 } // namespace content | 1336 } // namespace content |
| OLD | NEW |