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

Unified Diff: gpu/command_buffer/service/context_group.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/BUILD.gn ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_group.h
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index 86c239e93b9ca051bd1cdc6c96be20ffac8851a3..3641d1afe5036889ac9eee83a7f1c099d7e566f2 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -18,11 +18,13 @@
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/service/framebuffer_completeness_cache.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/command_buffer/service/shader_translator_cache.h"
#include "gpu/gpu_export.h"
namespace gpu {
+struct GpuPreferences;
class TransferBufferManager;
class ValueStateMap;
@@ -49,6 +51,7 @@ struct DisallowedFeatures;
class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
public:
ContextGroup(
+ const GpuPreferences& gpu_preferences,
const scoped_refptr<MailboxManager>& mailbox_manager,
const scoped_refptr<MemoryTracker>& memory_tracker,
const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
@@ -122,6 +125,10 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
return feature_info_.get();
}
+ const GpuPreferences& gpu_preferences() const {
+ return gpu_preferences_;
+ }
+
BufferManager* buffer_manager() const {
return buffer_manager_.get();
}
@@ -232,6 +239,7 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32_t* v);
bool HaveContexts();
+ const GpuPreferences& gpu_preferences_;
scoped_refptr<MailboxManager> mailbox_manager_;
scoped_refptr<MemoryTracker> memory_tracker_;
scoped_refptr<ShaderTranslatorCache> shader_translator_cache_;
« no previous file with comments | « gpu/command_buffer/service/BUILD.gn ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698