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

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

Issue 8480015: Allow switching to SwiftShader when GPU is blacklisted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename functions Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/gpu/gpu_data_manager.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.h
diff --git a/content/browser/gpu/gpu_data_manager.h b/content/browser/gpu/gpu_data_manager.h
index c3fee28e80c2396731e23c31f56eed3ee102c96a..e2585af8f099e7af71ab3970f4cc4886804188c3 100644
--- a/content/browser/gpu/gpu_data_manager.h
+++ b/content/browser/gpu/gpu_data_manager.h
@@ -9,6 +9,7 @@
#include <set>
#include <string>
+#include "base/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/observer_list_threadsafe.h"
@@ -127,6 +128,12 @@ class CONTENT_EXPORT GpuDataManager {
// Returns the Gpu Info as a DictionaryValue.
DictionaryValue* GpuInfoAsDictionaryValue() const;
+ // Returns true if the software rendering should currently be used.
+ bool software_rendering();
+
+ // Register a path to the SwiftShader software renderer.
+ void RegisterSwiftShaderPath(FilePath path);
+
private:
class UserFlags {
public:
@@ -211,6 +218,9 @@ class CONTENT_EXPORT GpuDataManager {
// lose_context could happen and whether skia is the backend.
bool supportsAccelerated2dCanvas() const;
+ // Try to switch to software rendering, if possible and necessary.
+ void EnableSoftwareRenderingIfNecessary();
+
bool complete_gpu_info_already_requested_;
GpuFeatureFlags gpu_feature_flags_;
@@ -227,6 +237,9 @@ class CONTENT_EXPORT GpuDataManager {
const scoped_refptr<GpuDataManagerObserverList> observer_list_;
ListValue log_messages_;
+ bool software_rendering_;
+
+ FilePath swiftshader_path_;
DISALLOW_COPY_AND_ASSIGN(GpuDataManager);
};
« no previous file with comments | « no previous file | content/browser/gpu/gpu_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698