summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsenorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 14:24:17 +0000
committersenorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 14:24:17 +0000
commitda8ccd25b461077070b410af07b20e03b4fefd36 (patch)
treed0482920238efa54e315e0e5c517be6faa28aab4
parent2c5c9d596ad422529c88b47db2b60eff9410cde0 (diff)
downloadchromium_src-da8ccd25b461077070b410af07b20e03b4fefd36.zip
chromium_src-da8ccd25b461077070b410af07b20e03b4fefd36.tar.gz
chromium_src-da8ccd25b461077070b410af07b20e03b4fefd36.tar.bz2
Add --enable-accelerated-filters flag to Chrome. This is the chrome-side change corresponding to http://trac.webkit.org/changeset/102088. Note that most of this is the result of blind devotion to cargo cult, based on code for other flags.
BUG=none TEST=none Review URL: http://codereview.chromium.org/8822025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113388 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc3
-rw-r--r--content/common/view_messages.h1
-rw-r--r--content/public/common/content_switches.cc3
-rw-r--r--content/public/common/content_switches.h1
-rw-r--r--webkit/glue/webpreferences.cc4
-rw-r--r--webkit/glue/webpreferences.h1
6 files changed, 13 insertions, 0 deletions
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 7f3b255..752fcbb 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -460,6 +460,9 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
web_prefs.accelerated_drawing_enabled =
GpuProcessHost::gpu_enabled() &&
command_line.HasSwitch(switches::kEnableAcceleratedDrawing);
+ web_prefs.accelerated_filters_enabled =
+ GpuProcessHost::gpu_enabled() &&
+ command_line.HasSwitch(switches::kEnableAcceleratedFilters);
web_prefs.accelerated_layers_enabled =
!command_line.HasSwitch(switches::kDisableAcceleratedLayers);
web_prefs.composite_to_texture_enabled =
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 475b98c..257cdc1 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -218,6 +218,7 @@ IPC_STRUCT_TRAITS_BEGIN(WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(fixed_position_compositing_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_2d_canvas_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_drawing_enabled)
+ IPC_STRUCT_TRAITS_MEMBER(accelerated_filters_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_plugins_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_layers_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_video_enabled)
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index f0f2c8d..c074ff9 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -172,6 +172,9 @@ const char kEnableAccelerated2dCanvas[] = "enable-accelerated-2d-canvas";
// in build/features_override.gypi.
const char kEnableAcceleratedDrawing[] = "enable-accelerated-drawing";
+// Enable gpu-accelerated SVG/W3C filters.
+const char kEnableAcceleratedFilters[] = "enable-accelerated-filters";
+
// Enables WebKit accessibility within the renderer process.
const char kEnableAccessibility[] = "enable-accessibility";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 03ea8ea..6b7a0a9 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -65,6 +65,7 @@ CONTENT_EXPORT extern const char kDisableWebAudio[];
extern const char kDisableWebSockets[];
extern const char kEnableAccelerated2dCanvas[];
CONTENT_EXPORT extern const char kEnableAcceleratedDrawing[];
+CONTENT_EXPORT extern const char kEnableAcceleratedFilters[];
extern const char kEnableAccessibility[];
extern const char kEnableAccessibilityLogging[];
CONTENT_EXPORT extern const char kEnableCompositingForFixedPosition[];
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index 8832ee2..5d36a37 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -85,6 +85,7 @@ WebPreferences::WebPreferences()
accelerated_video_enabled(false),
accelerated_2d_canvas_enabled(false),
accelerated_drawing_enabled(false),
+ accelerated_filters_enabled(false),
accelerated_plugins_enabled(false),
memory_info_enabled(false),
interactive_form_validation_enabled(true),
@@ -280,6 +281,9 @@ void WebPreferences::Apply(WebView* web_view) const {
// Enable gpu-accelerated drawing if requested on the command line.
settings->setAcceleratedDrawingEnabled(accelerated_drawing_enabled);
+ // Enable gpu-accelerated filters if requested on the command line.
+ settings->setAcceleratedFiltersEnabled(accelerated_filters_enabled);
+
// Enabling accelerated layers from the command line enabled accelerated
// 3D CSS, Video, and Animations.
settings->setAcceleratedCompositingFor3DTransformsEnabled(
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index 67518b5..e1648e4 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -99,6 +99,7 @@ struct WEBKIT_GLUE_EXPORT WebPreferences {
bool accelerated_video_enabled;
bool accelerated_2d_canvas_enabled;
bool accelerated_drawing_enabled;
+ bool accelerated_filters_enabled;
bool accelerated_plugins_enabled;
bool memory_info_enabled;
bool interactive_form_validation_enabled;