diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-02 00:23:37 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-02 00:23:37 +0000 |
commit | 183aa804ea52374ae1bca809516de677d94a6d95 (patch) | |
tree | bead5b668b4f08546d59591e6fa601b1874d22bf /chrome | |
parent | 385495be3c1fb10495f3a3ad2f4b47062e91ee77 (diff) | |
download | chromium_src-183aa804ea52374ae1bca809516de677d94a6d95.zip chromium_src-183aa804ea52374ae1bca809516de677d94a6d95.tar.gz chromium_src-183aa804ea52374ae1bca809516de677d94a6d95.tar.bz2 |
Adds a temporary switch --enable-glsl-translator which
turns on the OpenGL ES GLSL -> OpenGL GLSL translator
in WebGL.
This will be removed in a few weeks it becomes the default
but we need it now for testing.
TEST=hand tested
BUG=none
Review URL: http://codereview.chromium.org/2815008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 1 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc | 5 |
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; } |