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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 129633002: Also append GPU command-line flags to the browser in single-process mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-process cleanup Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/gpu/gpu_data_manager_impl_private.h" 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 bool success = gpu_driver_bug_list_->LoadList( 996 bool success = gpu_driver_bug_list_->LoadList(
997 gpu_driver_bug_list_json, gpu::GpuControlList::kCurrentOsOnly); 997 gpu_driver_bug_list_json, gpu::GpuControlList::kCurrentOsOnly);
998 DCHECK(success); 998 DCHECK(success);
999 } 999 }
1000 1000
1001 gpu_info_ = gpu_info; 1001 gpu_info_ = gpu_info;
1002 UpdateGpuInfo(gpu_info); 1002 UpdateGpuInfo(gpu_info);
1003 UpdateGpuSwitchingManager(gpu_info); 1003 UpdateGpuSwitchingManager(gpu_info);
1004 UpdatePreliminaryBlacklistedFeatures(); 1004 UpdatePreliminaryBlacklistedFeatures();
1005 1005
1006 CommandLine* command_line = CommandLine::ForCurrentProcess();
1007 // We pass down the list to GPU command buffer through commandline
1008 // switches at GPU process launch. However, in situations where we don't
1009 // have a GPU process, we append the browser process commandline.
1010 if (command_line->HasSwitch(switches::kSingleProcess) ||
1011 command_line->HasSwitch(switches::kInProcessGPU)) {
1012 if (!gpu_driver_bugs_.empty()) {
1013 command_line->AppendSwitchASCII(switches::kGpuDriverBugWorkarounds,
1014 IntSetToString(gpu_driver_bugs_));
1015 }
1016 }
1017 #if defined(OS_ANDROID) 1006 #if defined(OS_ANDROID)
1018 ApplyAndroidWorkarounds(gpu_info, command_line); 1007 ApplyAndroidWorkarounds(gpu_info, CommandLine::ForCurrentProcess());
1019 #endif // OS_ANDROID 1008 #endif // OS_ANDROID
1020 } 1009 }
1021 1010
1022 void GpuDataManagerImplPrivate::UpdateBlacklistedFeatures( 1011 void GpuDataManagerImplPrivate::UpdateBlacklistedFeatures(
1023 const std::set<int>& features) { 1012 const std::set<int>& features) {
1024 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1013 CommandLine* command_line = CommandLine::ForCurrentProcess();
1025 blacklisted_features_ = features; 1014 blacklisted_features_ = features;
1026 1015
1027 // Force disable using the GPU for these features, even if they would 1016 // Force disable using the GPU for these features, even if they would
1028 // otherwise be allowed. 1017 // otherwise be allowed.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 1166
1178 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { 1167 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() {
1179 gpu_process_accessible_ = false; 1168 gpu_process_accessible_ = false;
1180 gpu_info_.finalized = true; 1169 gpu_info_.finalized = true;
1181 complete_gpu_info_already_requested_ = true; 1170 complete_gpu_info_already_requested_ = true;
1182 // Some observers might be waiting. 1171 // Some observers might be waiting.
1183 NotifyGpuInfoUpdate(); 1172 NotifyGpuInfoUpdate();
1184 } 1173 }
1185 1174
1186 } // namespace content 1175 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698