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

Unified Diff: components/mus/gles2/gpu_state.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: components/mus/gles2/gpu_state.h
diff --git a/components/mus/gles2/gpu_state.h b/components/mus/gles2/gpu_state.h
index 78b9480b5efcac4c41eab1e4262cbd443886d054..dca04b680a963b9c3a9e48e0c8b1ae1ed0cabfc0 100644
--- a/components/mus/gles2/gpu_state.h
+++ b/components/mus/gles2/gpu_state.h
@@ -11,6 +11,7 @@
#include "base/threading/thread.h"
#include "components/mus/gles2/command_buffer_driver_manager.h"
#include "components/mus/gles2/command_buffer_task_runner.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/command_buffer/service/mailbox_manager_impl.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
#include "gpu/config/gpu_info.h"
@@ -37,6 +38,10 @@ class GpuState : public base::RefCountedThreadSafe<GpuState> {
void StopThreads();
+ const gpu::GpuPreferences& gpu_preferences() const {
+ return gpu_preferences_;
+ }
+
CommandBufferTaskRunner* command_buffer_task_runner() const {
return command_buffer_task_runner_.get();
}
@@ -74,6 +79,7 @@ class GpuState : public base::RefCountedThreadSafe<GpuState> {
// |control_thread_| is for mojo incoming calls of CommandBufferImpl.
base::Thread control_thread_;
+ gpu::GpuPreferences gpu_preferences_;
scoped_refptr<CommandBufferTaskRunner> command_buffer_task_runner_;
scoped_ptr<CommandBufferDriverManager> driver_manager_;
scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
« no previous file with comments | « components/mus/gles2/command_buffer_driver.cc ('k') | content/browser/android/synchronous_compositor_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698