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

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

Issue 684253003: Revert of Add logs to debug a flakiness on GPU Mac bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « content/browser/devtools/devtools_system_info_handler.cc ('k') | no next file » | 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 void GpuDataManagerImplPrivate::SetDisplayCount(unsigned int display_count) { 295 void GpuDataManagerImplPrivate::SetDisplayCount(unsigned int display_count) {
296 display_count_ = display_count; 296 display_count_ = display_count;
297 } 297 }
298 298
299 unsigned int GpuDataManagerImplPrivate::GetDisplayCount() const { 299 unsigned int GpuDataManagerImplPrivate::GetDisplayCount() const {
300 return display_count_; 300 return display_count_;
301 } 301 }
302 302
303 gpu::GPUInfo GpuDataManagerImplPrivate::GetGPUInfo() const { 303 gpu::GPUInfo GpuDataManagerImplPrivate::GetGPUInfo() const {
304 VLOG(2) << "GpuDataManagerImplPrivate::GetGPUInfo()";
305 return gpu_info_; 304 return gpu_info_;
306 } 305 }
307 306
308 void GpuDataManagerImplPrivate::GetGpuProcessHandles( 307 void GpuDataManagerImplPrivate::GetGpuProcessHandles(
309 const GpuDataManager::GetGpuProcessHandlesCallback& callback) const { 308 const GpuDataManager::GetGpuProcessHandlesCallback& callback) const {
310 GpuProcessHost::GetProcessHandles(callback); 309 GpuProcessHost::GetProcessHandles(callback);
311 } 310 }
312 311
313 bool GpuDataManagerImplPrivate::GpuAccessAllowed( 312 bool GpuDataManagerImplPrivate::GpuAccessAllowed(
314 std::string* reason) const { 313 std::string* reason) const {
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 use_swiftshader_(false), 897 use_swiftshader_(false),
899 use_warp_(false), 898 use_warp_(false),
900 card_blacklisted_(false), 899 card_blacklisted_(false),
901 update_histograms_(true), 900 update_histograms_(true),
902 window_count_(0), 901 window_count_(0),
903 domain_blocking_enabled_(true), 902 domain_blocking_enabled_(true),
904 owner_(owner), 903 owner_(owner),
905 display_count_(0), 904 display_count_(0),
906 gpu_process_accessible_(true), 905 gpu_process_accessible_(true),
907 finalized_(false) { 906 finalized_(false) {
908 VLOG(2) << "GpuDataManagerImplPrivate::GpuDataManagerImplPrivate()";
909 DCHECK(owner_); 907 DCHECK(owner_);
910 const base::CommandLine* command_line = 908 const base::CommandLine* command_line =
911 base::CommandLine::ForCurrentProcess(); 909 base::CommandLine::ForCurrentProcess();
912 if (command_line->HasSwitch(switches::kDisableGpu)) 910 if (command_line->HasSwitch(switches::kDisableGpu))
913 DisableHardwareAcceleration(); 911 DisableHardwareAcceleration();
914 912
915 #if defined(OS_MACOSX) 913 #if defined(OS_MACOSX)
916 CGGetActiveDisplayList (0, NULL, &display_count_); 914 CGGetActiveDisplayList (0, NULL, &display_count_);
917 CGDisplayRegisterReconfigurationCallback(DisplayReconfigCallback, owner_); 915 CGDisplayRegisterReconfigurationCallback(DisplayReconfigCallback, owner_);
918 #endif // OS_MACOSX 916 #endif // OS_MACOSX
919 917
920 // For testing only. 918 // For testing only.
921 if (command_line->HasSwitch(switches::kDisableDomainBlockingFor3DAPIs)) { 919 if (command_line->HasSwitch(switches::kDisableDomainBlockingFor3DAPIs)) {
922 domain_blocking_enabled_ = false; 920 domain_blocking_enabled_ = false;
923 } 921 }
924 } 922 }
925 923
926 GpuDataManagerImplPrivate::~GpuDataManagerImplPrivate() { 924 GpuDataManagerImplPrivate::~GpuDataManagerImplPrivate() {
927 VLOG(2) << "GpuDataManagerImplPrivate::~GpuDataManagerImplPrivate()";
928 #if defined(OS_MACOSX) 925 #if defined(OS_MACOSX)
929 CGDisplayRemoveReconfigurationCallback(DisplayReconfigCallback, owner_); 926 CGDisplayRemoveReconfigurationCallback(DisplayReconfigCallback, owner_);
930 #endif 927 #endif
931 } 928 }
932 929
933 void GpuDataManagerImplPrivate::InitializeImpl( 930 void GpuDataManagerImplPrivate::InitializeImpl(
934 const std::string& gpu_blacklist_json, 931 const std::string& gpu_blacklist_json,
935 const std::string& gpu_driver_bug_list_json, 932 const std::string& gpu_driver_bug_list_json,
936 const gpu::GPUInfo& gpu_info) { 933 const gpu::GPUInfo& gpu_info) {
937 VLOG(2) << "GpuDataManagerImplPrivate::InitializeImpl()";
938
939 const bool log_gpu_control_list_decisions = 934 const bool log_gpu_control_list_decisions =
940 base::CommandLine::ForCurrentProcess()->HasSwitch( 935 base::CommandLine::ForCurrentProcess()->HasSwitch(
941 switches::kLogGpuControlListDecisions); 936 switches::kLogGpuControlListDecisions);
942 937
943 if (!gpu_blacklist_json.empty()) { 938 if (!gpu_blacklist_json.empty()) {
944 gpu_blacklist_.reset(gpu::GpuBlacklist::Create()); 939 gpu_blacklist_.reset(gpu::GpuBlacklist::Create());
945 if (log_gpu_control_list_decisions) 940 if (log_gpu_control_list_decisions)
946 gpu_blacklist_->enable_control_list_logging("gpu_blacklist"); 941 gpu_blacklist_->enable_control_list_logging("gpu_blacklist");
947 bool success = gpu_blacklist_->LoadList( 942 bool success = gpu_blacklist_->LoadList(
948 gpu_blacklist_json, gpu::GpuControlList::kCurrentOsOnly); 943 gpu_blacklist_json, gpu::GpuControlList::kCurrentOsOnly);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1133 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1139 #if defined(OS_WIN) 1134 #if defined(OS_WIN)
1140 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1135 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1141 #endif 1136 #endif
1142 complete_gpu_info_already_requested_ = true; 1137 complete_gpu_info_already_requested_ = true;
1143 // Some observers might be waiting. 1138 // Some observers might be waiting.
1144 NotifyGpuInfoUpdate(); 1139 NotifyGpuInfoUpdate();
1145 } 1140 }
1146 1141
1147 } // namespace content 1142 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_system_info_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698