summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-12 00:33:42 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-12 00:33:42 +0000
commit32fc6ab6167aa03a7197d37aea94e3ee98d70c59 (patch)
treeedbf41f0b79362ecced16a82dd4e459200eacace /content/browser
parentec029c308d1a7b64f8ae0981023ffb7acbb10bff (diff)
downloadchromium_src-32fc6ab6167aa03a7197d37aea94e3ee98d70c59.zip
chromium_src-32fc6ab6167aa03a7197d37aea94e3ee98d70c59.tar.gz
chromium_src-32fc6ab6167aa03a7197d37aea94e3ee98d70c59.tar.bz2
Connect up --disable-gl-multisampling to command buffer
Plumb the --disable-gl-multisampling flag in to the command buffer, so it won't report the extension to any consumers. BUG=75181 TEST=webgl antialias test Review URL: http://codereview.chromium.org/6623063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/gpu_process_host.cc18
-rw-r--r--content/browser/gpu_process_host.h11
2 files changed, 23 insertions, 6 deletions
diff --git a/content/browser/gpu_process_host.cc b/content/browser/gpu_process_host.cc
index 900abff..bb1f4ad 100644
--- a/content/browser/gpu_process_host.cc
+++ b/content/browser/gpu_process_host.cc
@@ -102,10 +102,12 @@ class GpuMainThread : public base::Thread {
};
// static
-GpuProcessHost* GpuProcessHost::Create(int host_id) {
+GpuProcessHost* GpuProcessHost::Create(
+ int host_id,
+ const GpuFeatureFlags& gpu_feature_flags) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- GpuProcessHost* host = new GpuProcessHost(host_id);
+ GpuProcessHost* host = new GpuProcessHost(host_id, gpu_feature_flags);
if (!host->Init()) {
delete host;
return NULL;
@@ -124,9 +126,12 @@ GpuProcessHost* GpuProcessHost::FromID(int host_id) {
return g_hosts_by_id.Lookup(host_id);
}
-GpuProcessHost::GpuProcessHost(int host_id)
+GpuProcessHost::GpuProcessHost(
+ int host_id,
+ const GpuFeatureFlags& gpu_feature_flags)
: BrowserChildProcessHost(GPU_PROCESS, NULL),
- host_id_(host_id) {
+ host_id_(host_id),
+ gpu_feature_flags_(gpu_feature_flags) {
g_hosts_by_id.AddWithID(this, host_id_);
}
@@ -296,10 +301,15 @@ bool GpuProcessHost::LaunchGpuProcess() {
switches::kLoggingLevel,
switches::kNoGpuSandbox,
switches::kNoSandbox,
+ switches::kDisableGLMultisampling,
};
cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
arraysize(kSwitchNames));
+ if (gpu_feature_flags_.flags() & GpuFeatureFlags::kGpuFeatureMultisampling) {
+ cmd_line->AppendSwitch(switches::kDisableGLMultisampling);
+ }
+
// If specified, prepend a launcher program to the command line.
if (!gpu_launcher.empty())
cmd_line->PrependWrapper(gpu_launcher);
diff --git a/content/browser/gpu_process_host.h b/content/browser/gpu_process_host.h
index 69f5916..35c9163 100644
--- a/content/browser/gpu_process_host.h
+++ b/content/browser/gpu_process_host.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/threading/non_thread_safe.h"
+#include "chrome/common/gpu_feature_flags.h"
#include "content/browser/browser_child_process_host.h"
namespace IPC {
@@ -19,7 +20,9 @@ class GpuProcessHost : public BrowserChildProcessHost,
// Create a GpuProcessHost with the given ID. The object can be found using
// FromID with the same id.
- static GpuProcessHost* Create(int host_id);
+ static GpuProcessHost* Create(
+ int host_id,
+ const GpuFeatureFlags& gpu_feature_flags);
// Get the GPU process host for the GPU process with the given ID. Returns
// null if the process no longer exists.
@@ -31,7 +34,9 @@ class GpuProcessHost : public BrowserChildProcessHost,
virtual bool OnMessageReceived(const IPC::Message& message);
private:
- explicit GpuProcessHost(int host_id);
+ explicit GpuProcessHost(
+ int host_id,
+ const GpuFeatureFlags& gpu_feature_flags);
virtual ~GpuProcessHost();
bool Init();
@@ -49,6 +54,8 @@ class GpuProcessHost : public BrowserChildProcessHost,
// The serial number of the GpuProcessHost / GpuProcessHostUIShim pair.
int host_id_;
+ GpuFeatureFlags gpu_feature_flags_;
+
DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
};