Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1705)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 1038783002: Add switch (for cast_shell) to defer creation of GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment+naming update, reenable tests Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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)) {
1073 established_gpu_channel = always_uses_gpu = false; 1074 established_gpu_channel = always_uses_gpu = false;
1074 } 1075 }
1075 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); 1076 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
1076 ImageTransportFactory::Initialize(); 1077 ImageTransportFactory::Initialize();
1077 #if defined(USE_AURA) 1078 #if defined(USE_AURA)
1078 if (aura::Env::GetInstance()) { 1079 if (aura::Env::GetInstance()) {
1079 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); 1080 aura::Env::GetInstance()->set_context_factory(GetContextFactory());
1080 } 1081 }
1081 #endif 1082 #endif
1082 #elif defined(OS_ANDROID) 1083 #elif defined(OS_ANDROID)
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 1275
1275 void BrowserMainLoop::EndStartupTracing() { 1276 void BrowserMainLoop::EndStartupTracing() {
1276 is_tracing_startup_ = false; 1277 is_tracing_startup_ = false;
1277 TracingController::GetInstance()->DisableRecording( 1278 TracingController::GetInstance()->DisableRecording(
1278 TracingController::CreateFileSink( 1279 TracingController::CreateFileSink(
1279 startup_trace_file_, 1280 startup_trace_file_,
1280 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1281 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1281 } 1282 }
1282 1283
1283 } // namespace content 1284 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | content/browser/gpu/gpu_ipc_browsertests.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698