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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 } | 1062 } |
1063 #endif | 1063 #endif |
1064 | 1064 |
1065 if (initialize_gpu_data_manager) | 1065 if (initialize_gpu_data_manager) |
1066 GpuDataManagerImpl::GetInstance()->Initialize(); | 1066 GpuDataManagerImpl::GetInstance()->Initialize(); |
1067 | 1067 |
1068 bool always_uses_gpu = true; | 1068 bool always_uses_gpu = true; |
1069 bool established_gpu_channel = false; | 1069 bool established_gpu_channel = false; |
1070 #if defined(USE_AURA) || defined(OS_MACOSX) | 1070 #if defined(USE_AURA) || defined(OS_MACOSX) |
1071 established_gpu_channel = true; | 1071 established_gpu_channel = true; |
1072 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() || | 1072 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) { |
1073 parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit)) { | |
1074 established_gpu_channel = always_uses_gpu = false; | 1073 established_gpu_channel = always_uses_gpu = false; |
1075 } | 1074 } |
1076 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 1075 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
1077 ImageTransportFactory::Initialize(); | 1076 ImageTransportFactory::Initialize(); |
1078 #if defined(USE_AURA) | 1077 #if defined(USE_AURA) |
1079 if (aura::Env::GetInstance()) { | 1078 if (aura::Env::GetInstance()) { |
1080 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); | 1079 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); |
1081 } | 1080 } |
1082 #endif | 1081 #endif |
1083 #elif defined(OS_ANDROID) | 1082 #elif defined(OS_ANDROID) |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 | 1274 |
1276 void BrowserMainLoop::EndStartupTracing() { | 1275 void BrowserMainLoop::EndStartupTracing() { |
1277 is_tracing_startup_ = false; | 1276 is_tracing_startup_ = false; |
1278 TracingController::GetInstance()->DisableRecording( | 1277 TracingController::GetInstance()->DisableRecording( |
1279 TracingController::CreateFileSink( | 1278 TracingController::CreateFileSink( |
1280 startup_trace_file_, | 1279 startup_trace_file_, |
1281 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1280 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1282 } | 1281 } |
1283 | 1282 |
1284 } // namespace content | 1283 } // namespace content |
OLD | NEW |