summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjunov@chromium.org <junov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 23:01:13 +0000
committerjunov@chromium.org <junov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 23:01:13 +0000
commitb223d583d961fe5db4c0230dc9c7de711428930c (patch)
treea424e4e3525dccce6aadee12aca6ff733a073fe6 /content
parentf7e7ed6aaf600d99e9db6a4af51eec9d8983cb84 (diff)
downloadchromium_src-b223d583d961fe5db4c0230dc9c7de711428930c.zip
chromium_src-b223d583d961fe5db4c0230dc9c7de711428930c.tar.gz
chromium_src-b223d583d961fe5db4c0230dc9c7de711428930c.tar.bz2
Contributed by junov@chromium.org
Turns on the gpu accelerated canvas by default BUG=82017 TEST=none Review URL: http://codereview.chromium.org/7064032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/gpu/gpu_blacklist.cc25
-rw-r--r--content/browser/gpu/gpu_blacklist.h2
-rw-r--r--content/browser/gpu/gpu_data_manager.cc9
3 files changed, 19 insertions, 17 deletions
diff --git a/content/browser/gpu/gpu_blacklist.cc b/content/browser/gpu/gpu_blacklist.cc
index 6b0108a..b7650a5 100644
--- a/content/browser/gpu/gpu_blacklist.cc
+++ b/content/browser/gpu/gpu_blacklist.cc
@@ -713,7 +713,7 @@ bool GpuBlacklist::IsFeatureBlacklisted(
Value* GpuBlacklist::GetFeatureStatus(bool gpu_access_allowed,
bool disable_accelerated_compositing,
- bool enable_accelerated_2D_canvas,
+ bool disable_accelerated_2D_canvas,
bool disable_experimental_webgl,
bool disable_multisampling) const {
DictionaryValue* status = new DictionaryValue();
@@ -724,13 +724,13 @@ Value* GpuBlacklist::GetFeatureStatus(bool gpu_access_allowed,
// 2d_canvas.
if (!gpu_access_allowed) {
- if(enable_accelerated_2D_canvas)
+ if (disable_accelerated_2D_canvas)
feature_status_list->Append(NewStatusValue("2d_canvas",
- "unavailable_software"));
+ "software"));
else
feature_status_list->Append(NewStatusValue("2d_canvas",
- "software"));
- } else if (enable_accelerated_2D_canvas) {
+ "unavailable_software"));
+ } else if (!disable_accelerated_2D_canvas) {
if (IsFeatureBlacklisted(
GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas))
feature_status_list->Append(NewStatusValue("2d_canvas",
@@ -786,7 +786,7 @@ Value* GpuBlacklist::GetFeatureStatus(bool gpu_access_allowed,
if (!gpu_access_allowed)
feature_status_list->Append(NewStatusValue("multisampling",
"unavailable_off"));
- else if(disable_multisampling)
+ else if (disable_multisampling)
feature_status_list->Append(NewStatusValue("multisampling",
"disabled_off"));
else if (IsFeatureBlacklisted(
@@ -803,7 +803,7 @@ Value* GpuBlacklist::GetFeatureStatus(bool gpu_access_allowed,
// Build the problems list.
{
ListValue* problem_list = new ListValue();
- if(!gpu_access_allowed) {
+ if (!gpu_access_allowed) {
DictionaryValue* problem = new DictionaryValue();
problem->SetString("description",
"GPU process was unable to boot. Access to GPU disallowed.");
@@ -811,16 +811,15 @@ Value* GpuBlacklist::GetFeatureStatus(bool gpu_access_allowed,
problem->Set("webkitBugs", new ListValue());
problem_list->Append(problem);
}
- if(!enable_accelerated_2D_canvas) {
+ if (disable_accelerated_2D_canvas) {
DictionaryValue* problem = new DictionaryValue();
problem->SetString("description",
- "Accelerated 2D canvas has not been enabled "
- "(in about:flags or command line)");
+ "Accelerated 2D canvas has been disabled at the command line");
problem->Set("crBugs", new ListValue());
problem->Set("webkitBugs", new ListValue());
problem_list->Append(problem);
}
- if(disable_accelerated_compositing) {
+ if (disable_accelerated_compositing) {
DictionaryValue* problem = new DictionaryValue();
problem->SetString("description",
"Accelerated compositing has been disabled, either via about:flags "
@@ -829,7 +828,7 @@ Value* GpuBlacklist::GetFeatureStatus(bool gpu_access_allowed,
problem->Set("webkitBugs", new ListValue());
problem_list->Append(problem);
}
- if(disable_experimental_webgl) {
+ if (disable_experimental_webgl) {
DictionaryValue* problem = new DictionaryValue();
problem->SetString("description",
"WebGL has been disabled, either via about:flags "
@@ -838,7 +837,7 @@ Value* GpuBlacklist::GetFeatureStatus(bool gpu_access_allowed,
problem->Set("webkitBugs", new ListValue());
problem_list->Append(problem);
}
- if(disable_multisampling) {
+ if (disable_multisampling) {
DictionaryValue* problem = new DictionaryValue();
problem->SetString("description",
"Multisampling has been disabled, either via about:flags "
diff --git a/content/browser/gpu/gpu_blacklist.h b/content/browser/gpu/gpu_blacklist.h
index 134847c..cacac35 100644
--- a/content/browser/gpu/gpu_blacklist.h
+++ b/content/browser/gpu/gpu_blacklist.h
@@ -89,7 +89,7 @@ class GpuBlacklist {
// }
Value* GetFeatureStatus(bool gpu_access_allowed,
bool disable_accelerated_compositing,
- bool enable_accelerated_2D_canvas,
+ bool disable_accelerated_2D_canvas,
bool disable_experimental_webgl,
bool disable_multisampling) const;
diff --git a/content/browser/gpu/gpu_data_manager.cc b/content/browser/gpu/gpu_data_manager.cc
index d8cfe75..4580bdb 100644
--- a/content/browser/gpu/gpu_data_manager.cc
+++ b/content/browser/gpu/gpu_data_manager.cc
@@ -62,8 +62,10 @@ Value* GpuDataManager::GetFeatureStatus() {
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
if (gpu_blacklist_.get())
return gpu_blacklist_->GetFeatureStatus(GpuAccessAllowed(),
- browser_command_line.HasSwitch(switches::kDisableAcceleratedCompositing),
- browser_command_line.HasSwitch(switches::kEnableAccelerated2dCanvas),
+ browser_command_line.HasSwitch(
+ switches::kDisableAcceleratedCompositing),
+ browser_command_line.HasSwitch(
+ switches::kDisableAccelerated2dCanvas),
browser_command_line.HasSwitch(switches::kDisableExperimentalWebGL),
browser_command_line.HasSwitch(switches::kDisableGLMultisampling));
return NULL;
@@ -142,7 +144,8 @@ void GpuDataManager::AppendRendererCommandLine(
if (flags & GpuFeatureFlags::kGpuFeatureAcceleratedCompositing) {
const char* switches[] = {
switches::kDisableAcceleratedCompositing,
- switches::kDisableExperimentalWebGL
+ switches::kDisableExperimentalWebGL,
+ switches::kDisableAccelerated2dCanvas
};
const int switch_count = sizeof(switches) / sizeof(char*);
for (int i = 0; i < switch_count; ++i) {