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

Unified Diff: gpu/command_buffer/service/shader_translator.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/shader_translator.cc
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc
index 291b5d4ee1a63d125e9a641d0e616f09dc3f597f..928df8af740482072ac11441d9ab08a735a81935 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -15,7 +15,7 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/trace_event/trace_event.h"
-#include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_version_info.h"
@@ -195,8 +195,7 @@ int ShaderTranslator::GetCompileOptions() const {
SH_LIMIT_EXPRESSION_COMPLEXITY | SH_LIMIT_CALL_STACK_DEPTH |
SH_CLAMP_INDIRECT_ARRAY_BOUNDS;
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kGLShaderIntermOutput))
+ if (GpuPreferences::GetInstance()->gl_shader_interm_output)
compile_options |= SH_INTERMEDIATE_TREE;
compile_options |= driver_bug_workarounds_;

Powered by Google App Engine
This is Rietveld 408576698