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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.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
Index: gpu/command_buffer/service/in_process_command_buffer.h
diff --git a/gpu/command_buffer/service/in_process_command_buffer.h b/gpu/command_buffer/service/in_process_command_buffer.h
index 37b888a6d56c848887c42e68c3994966795f117c..2c0d3db62af8a4f952d6f9a40a28e95c3ba281ea 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.h
+++ b/gpu/command_buffer/service/in_process_command_buffer.h
@@ -24,6 +24,7 @@
#include "base/threading/thread.h"
#include "gpu/command_buffer/client/gpu_control.h"
#include "gpu/command_buffer/common/command_buffer.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/gpu_export.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/native_widget_types.h"
@@ -51,6 +52,7 @@ class StreamTextureManagerInProcess;
#endif
namespace gpu {
+struct GpuPreferences;
class SyncPointClient;
class SyncPointOrderData;
class SyncPointManager;
@@ -159,6 +161,7 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
virtual scoped_refptr<gles2::FramebufferCompletenessCache>
framebuffer_completeness_cache() = 0;
virtual SyncPointManager* sync_point_manager() = 0;
+ const gpu::GpuPreferences& gpu_preferences();
scoped_refptr<gfx::GLShareGroup> share_group();
scoped_refptr<gles2::MailboxManager> mailbox_manager();
scoped_refptr<gles2::SubscriptionRefSet> subscription_ref_set();
@@ -166,6 +169,7 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
gpu::gles2::ProgramCache* program_cache();
private:
+ gpu::GpuPreferences gpu_preferences_;
scoped_refptr<gfx::GLShareGroup> share_group_;
scoped_refptr<gles2::MailboxManager> mailbox_manager_;
scoped_refptr<gles2::SubscriptionRefSet> subscription_ref_set_;

Powered by Google App Engine
This is Rietveld 408576698