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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl.h

Issue 10915219: Add capability for GPU blacklist to manage GPU switching. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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) 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 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 20 matching lines...) Expand all
31 31
32 // GpuDataManager implementation. 32 // GpuDataManager implementation.
33 virtual void Initialize( 33 virtual void Initialize(
34 const std::string& browser_version_string, 34 const std::string& browser_version_string,
35 const std::string& gpu_blacklist_json) OVERRIDE; 35 const std::string& gpu_blacklist_json) OVERRIDE;
36 virtual void Initialize( 36 virtual void Initialize(
37 const std::string& browser_version_string, 37 const std::string& browser_version_string,
38 const std::string& gpu_blacklist_json, 38 const std::string& gpu_blacklist_json,
39 const content::GPUInfo& gpu_info) OVERRIDE; 39 const content::GPUInfo& gpu_info) OVERRIDE;
40 virtual content::GpuFeatureType GetBlacklistedFeatures() const OVERRIDE; 40 virtual content::GpuFeatureType GetBlacklistedFeatures() const OVERRIDE;
41 virtual content::GpuSwitchingOption GetGpuSwitchingOption() const OVERRIDE;
41 virtual base::ListValue* GetBlacklistReasons() const OVERRIDE; 42 virtual base::ListValue* GetBlacklistReasons() const OVERRIDE;
42 virtual std::string GetBlacklistVersion() const OVERRIDE; 43 virtual std::string GetBlacklistVersion() const OVERRIDE;
43 virtual content::GPUInfo GetGPUInfo() const OVERRIDE; 44 virtual content::GPUInfo GetGPUInfo() const OVERRIDE;
44 virtual bool GpuAccessAllowed() const OVERRIDE; 45 virtual bool GpuAccessAllowed() const OVERRIDE;
45 virtual void RequestCompleteGpuInfoIfNeeded() OVERRIDE; 46 virtual void RequestCompleteGpuInfoIfNeeded() OVERRIDE;
46 virtual bool IsCompleteGpuInfoAvailable() const OVERRIDE; 47 virtual bool IsCompleteGpuInfoAvailable() const OVERRIDE;
47 virtual void RequestVideoMemoryUsageStatsUpdate() const OVERRIDE; 48 virtual void RequestVideoMemoryUsageStatsUpdate() const OVERRIDE;
48 virtual bool ShouldUseSoftwareRendering() const OVERRIDE; 49 virtual bool ShouldUseSoftwareRendering() const OVERRIDE;
49 virtual void RegisterSwiftShaderPath(const FilePath& path) OVERRIDE; 50 virtual void RegisterSwiftShaderPath(const FilePath& path) OVERRIDE;
50 virtual void AddLogMessage(int level, const std::string& header, 51 virtual void AddLogMessage(int level, const std::string& header,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void EnableSoftwareRenderingIfNecessary(); 114 void EnableSoftwareRenderingIfNecessary();
114 115
115 // Send UMA histograms about the disabled/enabled features. 116 // Send UMA histograms about the disabled/enabled features.
116 void UpdateStats(); 117 void UpdateStats();
117 118
118 bool complete_gpu_info_already_requested_; 119 bool complete_gpu_info_already_requested_;
119 120
120 content::GpuFeatureType gpu_feature_type_; 121 content::GpuFeatureType gpu_feature_type_;
121 content::GpuFeatureType preliminary_gpu_feature_type_; 122 content::GpuFeatureType preliminary_gpu_feature_type_;
122 123
124 content::GpuSwitchingOption gpu_switching_;
125
123 content::GPUInfo gpu_info_; 126 content::GPUInfo gpu_info_;
124 mutable base::Lock gpu_info_lock_; 127 mutable base::Lock gpu_info_lock_;
125 128
126 scoped_ptr<GpuBlacklist> gpu_blacklist_; 129 scoped_ptr<GpuBlacklist> gpu_blacklist_;
127 130
128 const scoped_refptr<GpuDataManagerObserverList> observer_list_; 131 const scoped_refptr<GpuDataManagerObserverList> observer_list_;
129 132
130 ListValue log_messages_; 133 ListValue log_messages_;
131 mutable base::Lock log_messages_lock_; 134 mutable base::Lock log_messages_lock_;
132 135
133 bool software_rendering_; 136 bool software_rendering_;
134 137
135 FilePath swiftshader_path_; 138 FilePath swiftshader_path_;
136 139
137 // Current card force-blacklisted due to GPU crashes, or disabled through 140 // Current card force-blacklisted due to GPU crashes, or disabled through
138 // the --disable-gpu commandline switch. 141 // the --disable-gpu commandline switch.
139 bool card_blacklisted_; 142 bool card_blacklisted_;
140 143
141 // We disable histogram stuff in testing, especially in unit tests because 144 // We disable histogram stuff in testing, especially in unit tests because
142 // they cause random failures. 145 // they cause random failures.
143 bool update_histograms_; 146 bool update_histograms_;
144 147
145 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); 148 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl);
146 }; 149 };
147 150
148 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ 151 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698