Commit ce6eccf3 authored by vangelis@chromium.org's avatar vangelis@chromium.org

Add a command line flag (--enable-fixed-position-compositing) for enabling compositing

of fixed position elements.

BUG=None
TEST=Manual testing to verify the flag works.
Review URL: http://codereview.chromium.org/8404026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108166 0039d316-1c4b-4281-b951-d872f2087c98
parent 9a4f067c
......@@ -449,6 +449,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
command_line.HasSwitch(switches::kEnableThreadedCompositing);
web_prefs.force_compositing_mode =
command_line.HasSwitch(switches::kForceCompositingMode);
web_prefs.fixed_position_compositing_enabled =
command_line.HasSwitch(switches::kEnableCompositingForFixedPosition);
web_prefs.allow_webui_compositing =
command_line.HasSwitch(switches::kAllowWebUICompositing);
web_prefs.accelerated_2d_canvas_enabled =
......
......@@ -232,6 +232,7 @@ IPC_STRUCT_TRAITS_BEGIN(WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(force_compositing_mode)
IPC_STRUCT_TRAITS_MEMBER(allow_webui_compositing)
IPC_STRUCT_TRAITS_MEMBER(composite_to_texture_enabled)
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_plugins_enabled)
......
......@@ -181,6 +181,10 @@ const char kEnableAccessibility[] = "enable-accessibility";
// Turns on extremely verbose logging of accessibility events.
const char kEnableAccessibilityLogging[] = "enable-accessibility-logging";
// Enables the creation of compositing layers for fixed position elements.
const char kEnableCompositingForFixedPosition[] =
"enable-fixed-position-compositing";
// Enable DNS side checking of certificates. Still experimental, should only
// be used by developers at the current time.
const char kEnableDNSCertProvenanceChecking[] =
......
......@@ -67,6 +67,7 @@ extern const char kEnableAccelerated2dCanvas[];
CONTENT_EXPORT extern const char kEnableAcceleratedDrawing[];
extern const char kEnableAccessibility[];
extern const char kEnableAccessibilityLogging[];
CONTENT_EXPORT extern const char kEnableCompositingForFixedPosition[];
CONTENT_EXPORT extern const char kEnableDNSCertProvenanceChecking[];
CONTENT_EXPORT extern const char kEnableDeviceMotion[];
CONTENT_EXPORT extern const char kDisableFullScreen[];
......
......@@ -79,6 +79,7 @@ WebPreferences::WebPreferences()
force_compositing_mode(false),
allow_webui_compositing(false),
composite_to_texture_enabled(false),
fixed_position_compositing_enabled(false),
accelerated_layers_enabled(false),
accelerated_video_enabled(false),
accelerated_2d_canvas_enabled(false),
......@@ -264,6 +265,11 @@ void WebPreferences::Apply(WebView* web_view) const {
// Enable composite to offscreen texture if requested on the command line.
settings->setCompositeToTextureEnabled(composite_to_texture_enabled);
// Enable compositing for fixed position elements if requested
// on the command line.
settings->setAcceleratedCompositingForFixedPositionEnabled(
fixed_position_compositing_enabled);
// Enable gpu-accelerated 2d canvas if requested on the command line.
settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled);
......
......@@ -93,6 +93,7 @@ struct WebPreferences {
bool force_compositing_mode;
bool allow_webui_compositing;
bool composite_to_texture_enabled;
bool fixed_position_compositing_enabled;
bool accelerated_layers_enabled;
bool accelerated_video_enabled;
bool accelerated_2d_canvas_enabled;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment