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

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

Issue 865063002: Call AppendGpuCommandLine for sync compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gpu only Created 5 years, 10 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
« 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 *gl_version = gpu_info_.gl_version; 488 *gl_version = gpu_info_.gl_version;
489 } 489 }
490 490
491 void GpuDataManagerImplPrivate::Initialize() { 491 void GpuDataManagerImplPrivate::Initialize() {
492 TRACE_EVENT0("startup", "GpuDataManagerImpl::Initialize"); 492 TRACE_EVENT0("startup", "GpuDataManagerImpl::Initialize");
493 if (finalized_) { 493 if (finalized_) {
494 DVLOG(0) << "GpuDataManagerImpl marked as finalized; skipping Initialize"; 494 DVLOG(0) << "GpuDataManagerImpl marked as finalized; skipping Initialize";
495 return; 495 return;
496 } 496 }
497 497
498 const base::CommandLine* command_line = 498 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
499 base::CommandLine::ForCurrentProcess();
500 if (command_line->HasSwitch(switches::kSkipGpuDataLoading)) 499 if (command_line->HasSwitch(switches::kSkipGpuDataLoading))
501 return; 500 return;
502 501
503 gpu::GPUInfo gpu_info; 502 gpu::GPUInfo gpu_info;
504 if (command_line->GetSwitchValueASCII( 503 if (command_line->GetSwitchValueASCII(
505 switches::kUseGL) == gfx::kGLImplementationOSMesaName) { 504 switches::kUseGL) == gfx::kGLImplementationOSMesaName) {
506 // If using the OSMesa GL implementation, use fake vendor and device ids to 505 // If using the OSMesa GL implementation, use fake vendor and device ids to
507 // make sure it never gets blacklisted. This is better than simply 506 // make sure it never gets blacklisted. This is better than simply
508 // cancelling GPUInfo gathering as it allows us to proceed with loading the 507 // cancelling GPUInfo gathering as it allows us to proceed with loading the
509 // blacklist below which may have non-device specific entries we want to 508 // blacklist below which may have non-device specific entries we want to
(...skipping 23 matching lines...) Expand all
533 if (!command_line->HasSwitch(switches::kIgnoreGpuBlacklist) && 532 if (!command_line->HasSwitch(switches::kIgnoreGpuBlacklist) &&
534 !command_line->HasSwitch(switches::kUseGpuInTests)) { 533 !command_line->HasSwitch(switches::kUseGpuInTests)) {
535 gpu_blacklist_string = gpu::kSoftwareRenderingListJson; 534 gpu_blacklist_string = gpu::kSoftwareRenderingListJson;
536 } 535 }
537 if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { 536 if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
538 gpu_driver_bug_list_string = gpu::kGpuDriverBugListJson; 537 gpu_driver_bug_list_string = gpu::kGpuDriverBugListJson;
539 } 538 }
540 InitializeImpl(gpu_blacklist_string, 539 InitializeImpl(gpu_blacklist_string,
541 gpu_driver_bug_list_string, 540 gpu_driver_bug_list_string,
542 gpu_info); 541 gpu_info);
542
543 if (command_line->HasSwitch(switches::kSingleProcess) ||
544 command_line->HasSwitch(switches::kInProcessGPU)) {
545 command_line->AppendSwitch(switches::kDisableGpuWatchdog);
546 AppendGpuCommandLine(command_line);
547 }
543 } 548 }
544 549
545 void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() { 550 void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
546 GetContentClient()->SetGpuInfo(gpu_info_); 551 GetContentClient()->SetGpuInfo(gpu_info_);
547 552
548 if (gpu_blacklist_) { 553 if (gpu_blacklist_) {
549 std::set<int> features = gpu_blacklist_->MakeDecision( 554 std::set<int> features = gpu_blacklist_->MakeDecision(
550 gpu::GpuControlList::kOsAny, std::string(), gpu_info_); 555 gpu::GpuControlList::kOsAny, std::string(), gpu_info_);
551 if (update_histograms_) 556 if (update_histograms_)
552 UpdateStats(gpu_info_, gpu_blacklist_.get(), features); 557 UpdateStats(gpu_info_, gpu_blacklist_.get(), features);
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1140 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1136 #if defined(OS_WIN) 1141 #if defined(OS_WIN)
1137 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1142 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1138 #endif 1143 #endif
1139 complete_gpu_info_already_requested_ = true; 1144 complete_gpu_info_already_requested_ = true;
1140 // Some observers might be waiting. 1145 // Some observers might be waiting.
1141 NotifyGpuInfoUpdate(); 1146 NotifyGpuInfoUpdate();
1142 } 1147 }
1143 1148
1144 } // namespace content 1149 } // 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