summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc1
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc5
4 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 1afe34a..d624bda 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -564,6 +564,7 @@ void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer(
// information is needed very early during bringup. We prefer to
// use the WebPreferences to set this flag on a page-by-page basis.
switches::kEnableExperimentalWebGL,
+ switches::kEnableGLSLTranslator,
switches::kInProcessWebGL,
#if defined(OS_MACOSX)
// Allow this to be set when invoking the browser and relayed along.
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index e89f57e..dfbe77e 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -311,6 +311,9 @@ const char kEnableIndexedDatabase[] = "enable-indexed-database";
// This flag overrides "disable-ipv6" which appears elswhere in this file.
const char kEnableIPv6[] = "enable-ipv6";
+// Enable the GLSL translator.
+const char kEnableGLSLTranslator[] = "enable-glsl-translator";
+
// Enable the GPU plugin and Pepper 3D rendering.
const char kEnableGPUPlugin[] = "enable-gpu-plugin";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 183c3a9..afb798a 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -101,6 +101,7 @@ extern const char kEnableExtensionTimelineApi[];
extern const char kEnableExtensionToolstrips[];
extern const char kEnableFastback[];
extern const char kEnableFileCookies[];
+extern const char kEnableGLSLTranslator[];
extern const char kEnableGPUPlugin[];
extern const char kEnableGPURendering[];
extern const char kEnableIndexedDatabase[];
diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
index bffb690..56c6392 100644
--- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
+++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
@@ -63,7 +63,10 @@ bool WebGraphicsContext3DCommandBufferImpl::initialize(
if (!context_)
return false;
// TODO(gman): Remove this.
- DisableShaderTranslation(context_);
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (!command_line.HasSwitch(switches::kEnableGLSLTranslator)) {
+ DisableShaderTranslation(context_);
+ }
return true;
}