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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 if (parsed_command_line_.HasSwitch(switches::kRendererProcessLimit)) { | 423 if (parsed_command_line_.HasSwitch(switches::kRendererProcessLimit)) { |
424 std::string limit_string = parsed_command_line_.GetSwitchValueASCII( | 424 std::string limit_string = parsed_command_line_.GetSwitchValueASCII( |
425 switches::kRendererProcessLimit); | 425 switches::kRendererProcessLimit); |
426 size_t process_limit; | 426 size_t process_limit; |
427 if (base::StringToSizeT(limit_string, &process_limit)) { | 427 if (base::StringToSizeT(limit_string, &process_limit)) { |
428 RenderProcessHost::SetMaxRendererProcessCount(process_limit); | 428 RenderProcessHost::SetMaxRendererProcessCount(process_limit); |
429 } | 429 } |
430 } | 430 } |
431 #endif // !defined(OS_IOS) | 431 #endif // !defined(OS_IOS) |
432 | 432 |
| 433 if (parsed_command_line_.HasSwitch(switches::kEnableNativeGpuMemoryBuffers)) { |
| 434 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( |
| 435 gfx::GpuMemoryBuffer::MAP); |
| 436 } |
| 437 |
| 438 #if defined(USE_OZONE) |
| 439 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( |
| 440 gfx::GpuMemoryBuffer::SCANOUT); |
| 441 #endif |
| 442 |
433 if (parts_) | 443 if (parts_) |
434 parts_->PostEarlyInitialization(); | 444 parts_->PostEarlyInitialization(); |
435 } | 445 } |
436 | 446 |
437 void BrowserMainLoop::MainMessageLoopStart() { | 447 void BrowserMainLoop::MainMessageLoopStart() { |
438 TRACE_EVENT0("startup", "BrowserMainLoop::MainMessageLoopStart"); | 448 TRACE_EVENT0("startup", "BrowserMainLoop::MainMessageLoopStart"); |
439 if (parts_) { | 449 if (parts_) { |
440 TRACE_EVENT0("startup", | 450 TRACE_EVENT0("startup", |
441 "BrowserMainLoop::MainMessageLoopStart:PreMainMessageLoopStart"); | 451 "BrowserMainLoop::MainMessageLoopStart:PreMainMessageLoopStart"); |
442 parts_->PreMainMessageLoopStart(); | 452 parts_->PreMainMessageLoopStart(); |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 | 1203 |
1194 void BrowserMainLoop::EndStartupTracing() { | 1204 void BrowserMainLoop::EndStartupTracing() { |
1195 is_tracing_startup_ = false; | 1205 is_tracing_startup_ = false; |
1196 TracingController::GetInstance()->DisableRecording( | 1206 TracingController::GetInstance()->DisableRecording( |
1197 TracingController::CreateFileSink( | 1207 TracingController::CreateFileSink( |
1198 startup_trace_file_, | 1208 startup_trace_file_, |
1199 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1209 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1200 } | 1210 } |
1201 | 1211 |
1202 } // namespace content | 1212 } // namespace content |
OLD | NEW |