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

Side by Side Diff: chrome/browser/gpu_data_manager.cc

Issue 6712048: Implement easy GPU feature status summary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First rev Created 9 years, 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/gpu_data_manager.h" 5 #include "chrome/browser/gpu_data_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // updated GPU info. 81 // updated GPU info.
82 gpu_feature_flags_set_ = false; 82 gpu_feature_flags_set_ = false;
83 RunGpuInfoUpdateCallbacks(); 83 RunGpuInfoUpdateCallbacks();
84 } 84 }
85 85
86 const GPUInfo& GpuDataManager::gpu_info() const { 86 const GPUInfo& GpuDataManager::gpu_info() const {
87 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 87 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
88 return gpu_info_; 88 return gpu_info_;
89 } 89 }
90 90
91 Value* GpuDataManager::GetBlacklistingReasons() const { 91 Value* GpuDataManager::GetBlacklistStatus() const {
92 if (gpu_feature_flags_.flags() != 0 && gpu_blacklist_.get()) 92 if (gpu_blacklist_.get())
93 return gpu_blacklist_->GetBlacklistingReasons(); 93 return gpu_blacklist_->GetStatus();
94 return NULL; 94 return NULL;
95 } 95 }
96 96
97 std::string GpuDataManager::GetBlacklistVersion() const { 97 std::string GpuDataManager::GetBlacklistVersion() const {
98 if (gpu_blacklist_.get() != NULL) { 98 if (gpu_blacklist_.get() != NULL) {
99 uint16 version_major, version_minor; 99 uint16 version_major, version_minor;
100 if (gpu_blacklist_->GetVersion(&version_major, 100 if (gpu_blacklist_->GetVersion(&version_major,
101 &version_minor)) { 101 &version_minor)) {
102 std::string version_string = 102 std::string version_string =
103 base::UintToString(static_cast<unsigned>(version_major)) + 103 base::UintToString(static_cast<unsigned>(version_major)) +
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || 289 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) ||
290 browser_command_line.GetSwitchValueASCII( 290 browser_command_line.GetSwitchValueASCII(
291 switches::kUseGL) == gfx::kGLImplementationOSMesaName) 291 switches::kUseGL) == gfx::kGLImplementationOSMesaName)
292 return NULL; 292 return NULL;
293 UpdateGpuBlacklist(); 293 UpdateGpuBlacklist();
294 // No need to return an empty blacklist. 294 // No need to return an empty blacklist.
295 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) 295 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0)
296 return NULL; 296 return NULL;
297 return gpu_blacklist_.get(); 297 return gpu_blacklist_.get();
298 } 298 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698