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

Unified Diff: content/browser/gpu/gpu_data_manager_impl.h

Issue 10908110: Move gpu blacklist to content side. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_blacklist_unittest.cc ('k') | content/browser/gpu/gpu_data_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl.h
===================================================================
--- content/browser/gpu/gpu_data_manager_impl.h (revision 155054)
+++ content/browser/gpu/gpu_data_manager_impl.h (working copy)
@@ -16,6 +16,7 @@
#include "base/observer_list_threadsafe.h"
#include "base/synchronization/lock.h"
#include "base/values.h"
+#include "content/browser/gpu/gpu_blacklist.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/common/gpu_info.h"
#include "content/public/common/gpu_memory_stats.h"
@@ -29,10 +30,12 @@
static GpuDataManagerImpl* GetInstance();
// GpuDataManager implementation.
- virtual void InitializeGpuInfo() OVERRIDE;
+ virtual void Initialize(
+ const std::string& browser_version_string,
+ const std::string& gpu_blacklist_json) OVERRIDE;
virtual content::GpuFeatureType GetBlacklistedFeatures() const OVERRIDE;
- virtual void SetPreliminaryBlacklistedFeatures(
- content::GpuFeatureType features) OVERRIDE;
+ virtual base::ListValue* GetBlacklistReasons() const OVERRIDE;
+ virtual std::string GetBlacklistVersion() const OVERRIDE;
virtual content::GPUInfo GetGPUInfo() const OVERRIDE;
virtual bool GpuAccessAllowed() const OVERRIDE;
virtual void RequestCompleteGpuInfoIfNeeded() OVERRIDE;
@@ -47,7 +50,8 @@
virtual void RemoveObserver(
content::GpuDataManagerObserver* observer) OVERRIDE;
- // Only update if the current GPUInfo is not finalized.
+ // Only update if the current GPUInfo is not finalized. If blacklist is
+ // loaded, run through blacklist and update blacklisted features.
void UpdateGpuInfo(const content::GPUInfo& gpu_info);
void UpdateVideoMemoryUsageStats(
@@ -91,16 +95,21 @@
GpuDataManagerImpl();
virtual ~GpuDataManagerImpl();
- // If flags hasn't been set and GPUInfo is available, run through blacklist
- // and compute the flags.
void UpdateBlacklistedFeatures(content::GpuFeatureType features);
+ // This should only be called once at initialization time, when preliminary
+ // gpu info is collected.
+ void UpdatePreliminaryBlacklistedFeatures();
+
// Notify all observers whenever there is a GPU info update.
void NotifyGpuInfoUpdate();
// Try to switch to software rendering, if possible and necessary.
void EnableSoftwareRenderingIfNecessary();
+ // Send UMA histograms about the disabled/enabled features.
+ void UpdateStats();
+
bool complete_gpu_info_already_requested_;
content::GpuFeatureType gpu_feature_type_;
@@ -109,6 +118,8 @@
content::GPUInfo gpu_info_;
mutable base::Lock gpu_info_lock_;
+ scoped_ptr<GpuBlacklist> gpu_blacklist_;
+
const scoped_refptr<GpuDataManagerObserverList> observer_list_;
ListValue log_messages_;
« no previous file with comments | « content/browser/gpu/gpu_blacklist_unittest.cc ('k') | content/browser/gpu/gpu_data_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698