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/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 if (parsed_command_line_.HasSwitch(switches::kEnableNativeGpuMemoryBuffers)) { | 454 if (parsed_command_line_.HasSwitch(switches::kEnableNativeGpuMemoryBuffers)) { |
455 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( | 455 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( |
456 gfx::GpuMemoryBuffer::MAP); | 456 gfx::GpuMemoryBuffer::MAP); |
457 } | 457 } |
458 | 458 |
459 #if defined(USE_OZONE) | 459 #if defined(USE_OZONE) |
460 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( | 460 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( |
461 gfx::GpuMemoryBuffer::SCANOUT); | 461 gfx::GpuMemoryBuffer::SCANOUT); |
462 #endif | 462 #endif |
463 | 463 |
464 base::DiscardableMemoryShmemAllocator::SetInstance( | 464 base::DiscardableMemoryAllocator::SetInstance( |
465 HostDiscardableSharedMemoryManager::current()); | 465 HostDiscardableSharedMemoryManager::current()); |
466 | 466 |
467 if (parts_) | 467 if (parts_) |
468 parts_->PostEarlyInitialization(); | 468 parts_->PostEarlyInitialization(); |
469 } | 469 } |
470 | 470 |
471 void BrowserMainLoop::MainMessageLoopStart() { | 471 void BrowserMainLoop::MainMessageLoopStart() { |
472 TRACE_EVENT0("startup", "BrowserMainLoop::MainMessageLoopStart"); | 472 TRACE_EVENT0("startup", "BrowserMainLoop::MainMessageLoopStart"); |
473 if (parts_) { | 473 if (parts_) { |
474 TRACE_EVENT0("startup", | 474 TRACE_EVENT0("startup", |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 | 1274 |
1275 void BrowserMainLoop::EndStartupTracing() { | 1275 void BrowserMainLoop::EndStartupTracing() { |
1276 is_tracing_startup_ = false; | 1276 is_tracing_startup_ = false; |
1277 TracingController::GetInstance()->DisableRecording( | 1277 TracingController::GetInstance()->DisableRecording( |
1278 TracingController::CreateFileSink( | 1278 TracingController::CreateFileSink( |
1279 startup_trace_file_, | 1279 startup_trace_file_, |
1280 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1280 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1281 } | 1281 } |
1282 | 1282 |
1283 } // namespace content | 1283 } // namespace content |
OLD | NEW |