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

Unified Diff: gpu/command_buffer/service/program_manager.h

Issue 1716813002: Use GpuPreferences to avoid directly accessing switches in gpu related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 10 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 | « gpu/command_buffer/service/mocks.h ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager.h
diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h
index cf98d0ad943e512c472fc9aabd4866ecdddb4323..cde5abd0a7cddc72d84b5ea148d69bdfb0755bff 100644
--- a/gpu/command_buffer/service/program_manager.h
+++ b/gpu/command_buffer/service/program_manager.h
@@ -21,6 +21,9 @@
#include "gpu/gpu_export.h"
namespace gpu {
+
+struct GpuPreferences;
+
namespace gles2 {
class FeatureInfo;
@@ -28,7 +31,6 @@ class ProgramCache;
class ProgramManager;
class Shader;
class ShaderManager;
-class FeatureInfo;
// This is used to track which attributes a particular program needs
// so we can verify at glDrawXXX time that every attribute is either disabled
@@ -542,10 +544,11 @@ class GPU_EXPORT Program : public base::RefCounted<Program> {
// need to be shared by multiple GLES2Decoders.
class GPU_EXPORT ProgramManager {
public:
- explicit ProgramManager(ProgramCache* program_cache,
- uint32_t max_varying_vectors,
- uint32_t max_dual_source_draw_buffers,
- FeatureInfo* feature_info);
+ ProgramManager(ProgramCache* program_cache,
+ uint32_t max_varying_vectors,
+ uint32_t max_dual_source_draw_buffers,
+ const GpuPreferences& gpu_preferences,
+ FeatureInfo* feature_info);
~ProgramManager();
// Must call before destruction.
@@ -618,6 +621,7 @@ class GPU_EXPORT ProgramManager {
uint32_t max_varying_vectors_;
uint32_t max_dual_source_draw_buffers_;
+ const GpuPreferences& gpu_preferences_;
scoped_refptr<FeatureInfo> feature_info_;
DISALLOW_COPY_AND_ASSIGN(ProgramManager);
« no previous file with comments | « gpu/command_buffer/service/mocks.h ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698