summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/about_flags.cc16
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc2
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/common/render_messages.cc2
5 files changed, 15 insertions, 9 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index fec86c4..b46a101 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -201,15 +201,13 @@ const Experiment kExperiments[] = {
kOsMac,
SINGLE_VALUE_TYPE(switches::kEnablePredictiveInstant)
},
- // FIXME(scheib): Add Flags entry for accelerated Compositing,
- // or pull it and the strings in generated_resources.grd by Dec 2010
- // {
- // "gpu-compositing",
- // IDS_FLAGS_ACCELERATED_COMPOSITING_NAME,
- // IDS_FLAGS_ACCELERATED_COMPOSITING_DESCRIPTION,
- // kOsAll,
- // SINGLE_VALUE_TYPE(switches::kDisableAcceleratedCompositing)
- // },
+ {
+ "gpu-compositing",
+ IDS_FLAGS_ACCELERATED_COMPOSITING_NAME,
+ IDS_FLAGS_ACCELERATED_COMPOSITING_DESCRIPTION,
+ kOsAll,
+ SINGLE_VALUE_TYPE(switches::kEnableAcceleratedLayers)
+ },
{
"gpu-canvas-2d", // FLAGS:RECORD_UMA
IDS_FLAGS_ACCELERATED_CANVAS_2D_NAME,
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 707080b3..c7f59ff 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -287,6 +287,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
web_prefs.accelerated_2d_canvas_enabled =
gpu_enabled() &&
command_line.HasSwitch(switches::kEnableAccelerated2dCanvas);
+ web_prefs.accelerated_layers_enabled =
+ command_line.HasSwitch(switches::kEnableAcceleratedLayers);
web_prefs.memory_info_enabled =
command_line.HasSwitch(switches::kEnableMemoryInfo);
web_prefs.hyperlink_auditing_enabled =
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 33cfe75..be4e83d 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -387,6 +387,9 @@ extern const char kLogNetLog[] = "log-net-log";
// Enable gpu-accelerated 2d canvas.
const char kEnableAccelerated2dCanvas[] = "enable-accelerated-2d-canvas";
+// Enables the hardware acceleration of 3D CSS, Video and animation.
+const char kEnableAcceleratedLayers[] = "enable-accelerated-layers";
+
// Enables WebKit accessibility within the renderer process.
const char kEnableAccessibility[] = "enable-accessibility";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 26c79bf..8c3ecaf 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -118,6 +118,7 @@ extern const char kDnsServer[];
extern const char kDomAutomationController[];
extern const char kDumpHistogramsOnExit[];
extern const char kEnableAccelerated2dCanvas[];
+extern const char kEnableAcceleratedLayers[];
extern const char kEnableAccessibility[];
extern const char kEnableAeroPeekTabs[];
extern const char kEnableAppLauncher[];
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc
index 1df6c3a..be20600 100644
--- a/chrome/common/render_messages.cc
+++ b/chrome/common/render_messages.cc
@@ -736,6 +736,7 @@ void ParamTraits<WebPreferences>::Write(Message* m, const param_type& p) {
WriteParam(m, p.show_composited_layer_borders);
WriteParam(m, p.accelerated_compositing_enabled);
WriteParam(m, p.accelerated_2d_canvas_enabled);
+ WriteParam(m, p.accelerated_layers_enabled);
WriteParam(m, p.memory_info_enabled);
}
@@ -786,6 +787,7 @@ bool ParamTraits<WebPreferences>::Read(const Message* m, void** iter,
ReadParam(m, iter, &p->show_composited_layer_borders) &&
ReadParam(m, iter, &p->accelerated_compositing_enabled) &&
ReadParam(m, iter, &p->accelerated_2d_canvas_enabled) &&
+ ReadParam(m, iter, &p->accelerated_layers_enabled) &&
ReadParam(m, iter, &p->memory_info_enabled);
}