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

Unified Diff: gpu/command_buffer/service/context_group.cc

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/context_group.cc
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index a1dc17cc9d5d487ab6b0a0ef97be850e79d038b9..7bf1606eec614d91cd04a00a91152c2b68e8be36 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -14,7 +14,7 @@
#include "gpu/command_buffer/common/value_state.h"
#include "gpu/command_buffer/service/buffer_manager.h"
#include "gpu/command_buffer/service/framebuffer_manager.h"
-#include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/command_buffer/service/mailbox_manager_impl.h"
#include "gpu/command_buffer/service/path_manager.h"
#include "gpu/command_buffer/service/program_manager.h"
@@ -83,11 +83,7 @@ ContextGroup::ContextGroup(
#endif
subscription_ref_set_(subscription_ref_set),
pending_valuebuffer_state_(pending_valuebuffer_state),
- enforce_gl_minimums_(
- base::CommandLine::InitializedForCurrentProcess()
- ? base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnforceGLMinimums)
- : false),
+ enforce_gl_minimums_(GpuPreferences::GetInstance()->enforce_gl_minimums),
bind_generates_resource_(bind_generates_resource),
max_vertex_attribs_(0u),
max_texture_units_(0u),

Powered by Google App Engine
This is Rietveld 408576698