From 5dc979a4b2f51040618afe35019bf24eca0af618 Mon Sep 17 00:00:00 2001 From: "gman@google.com" Date: Mon, 24 Aug 2009 19:30:43 +0000 Subject: Make Mac also look for O3D_FORCE_SOFTWARE_RENDERER environment variable. In the Mac version, the place it's added lets one instance use the hardware renderer and another instance use the software renderer. The windows version does this as well. Review URL: http://codereview.chromium.org/173248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24127 0039d316-1c4b-4281-b951-d872f2087c98 --- o3d/plugin/idl/client.idl | 22 ++++++++++++++++++++++ o3d/plugin/mac/config_mac.mm | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'o3d/plugin') diff --git a/o3d/plugin/idl/client.idl b/o3d/plugin/idl/client.idl index fb36b53..f8810e7 100644 --- a/o3d/plugin/idl/client.idl +++ b/o3d/plugin/idl/client.idl @@ -116,6 +116,28 @@ class ClientInfo { %[ Whether or not O3D is using the software renderer. + + For testing purposes you can force O3D to use the software renderer + by setting the environment variable O3D_FORCE_SOFTWARE_RENDERER to + anything. + + \code + set O3D_FORCE_SOFTWARE_RENDERER=foo + \endcode + or + \code + export O3D_FORCE_SOFTWARE_RENDERER=foo + \endcode + + You can set it at a system level if you want to set it for all + browser instances or set it from a command line and start your + browser from that same command line if you want to effect just + that instance of the browser. + + Note that many browers require special command line options to + run in a separate process, otherwise they default to finding + the browser process already running and using that. For example + firefox requires the option -no-remote. %] [getter] bool software_renderer; diff --git a/o3d/plugin/mac/config_mac.mm b/o3d/plugin/mac/config_mac.mm index ec304da..eb995298 100644 --- a/o3d/plugin/mac/config_mac.mm +++ b/o3d/plugin/mac/config_mac.mm @@ -41,6 +41,7 @@ #include #include +#include "core/cross/renderer.h" #include "plugin/cross/config.h" #include "plugin/cross/plugin_metrics.h" #include "plugin_mac.h" @@ -186,7 +187,7 @@ bool UseSoftwareRenderer() { is_initialized = true; } - return use_software_renderer; + return use_software_renderer || Renderer::IsForceSoftwareRenderer(); } static bool GetVideoCardMetrics(CGDirectDisplayID displayID) { -- cgit v1.1