summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-24 19:30:43 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-24 19:30:43 +0000
commit5dc979a4b2f51040618afe35019bf24eca0af618 (patch)
tree0c1abafc096501af9ab98fd368fb2146295ed313 /o3d/plugin
parent2a1c0f32a8611defc5f0f5b9e4022efc1810c93f (diff)
downloadchromium_src-5dc979a4b2f51040618afe35019bf24eca0af618.zip
chromium_src-5dc979a4b2f51040618afe35019bf24eca0af618.tar.gz
chromium_src-5dc979a4b2f51040618afe35019bf24eca0af618.tar.bz2
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
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/idl/client.idl22
-rw-r--r--o3d/plugin/mac/config_mac.mm3
2 files changed, 24 insertions, 1 deletions
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 <iostream>
#include <fstream>
+#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) {