Skip to content

Commit

Permalink
Add an --enable-container-culling commandline flag.
Browse files Browse the repository at this point in the history
Plumbing for Blink's containerCullingEnabled (experimental Skia culling
for containers).

R=jamesr@chromium.org,piman@chromium.org

Review URL: https://codereview.chromium.org/227593007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263074 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
fmalita@chromium.org committed Apr 10, 2014
1 parent 00dd7d8 commit 1845a7f
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions chrome/browser/chromeos/login/chrome_restart_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ std::string DeriveCommandLine(const GURL& start_url,
::switches::kDisableGestureTapHighlight,
::switches::kDisableGpuSandbox,
::switches::kEnableDeferredFilters,
::switches::kEnableContainerCulling,
::switches::kEnableGpuRasterization,
::switches::kEnableImplSidePainting,
::switches::kEnableLogging,
Expand Down
2 changes: 2 additions & 0 deletions content/browser/renderer_host/render_view_host_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@ WebPreferences RenderViewHostImpl::GetWebkitPrefs(const GURL& url) {
switches::kAcceleratedCanvas2dMSAASampleCount).c_str());
prefs.deferred_filters_enabled =
command_line.HasSwitch(switches::kEnableDeferredFilters);
prefs.container_culling_enabled =
command_line.HasSwitch(switches::kEnableContainerCulling);
prefs.accelerated_compositing_for_3d_transforms_enabled =
prefs.accelerated_compositing_for_animation_enabled =
!command_line.HasSwitch(switches::kDisableAcceleratedLayers);
Expand Down
1 change: 1 addition & 0 deletions content/public/common/common_param_traits_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ IPC_STRUCT_TRAITS_BEGIN(WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(accelerated_2d_canvas_msaa_sample_count)
IPC_STRUCT_TRAITS_MEMBER(accelerated_filters_enabled)
IPC_STRUCT_TRAITS_MEMBER(deferred_filters_enabled)
IPC_STRUCT_TRAITS_MEMBER(container_culling_enabled)
IPC_STRUCT_TRAITS_MEMBER(gesture_tap_highlight_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_compositing_for_plugins_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_compositing_for_3d_transforms_enabled)
Expand Down
3 changes: 3 additions & 0 deletions content/public/common/content_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ const char kEnableLCDText[] = "enable-lcd-text";
const char kEnableLayerSquashing[] =
"enable-layer-squashing";

// Enable experimental container node culling.
const char kEnableContainerCulling[] = "enable-container-culling";

// Turns on extremely verbose logging of accessibility events.
const char kEnableAccessibilityLogging[] = "enable-accessibility-logging";

Expand Down
1 change: 1 addition & 0 deletions content/public/common/content_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ CONTENT_EXPORT extern const char kEnableDeferredFilters[];
CONTENT_EXPORT extern const char kEnableAcceleratedFixedRootBackground[];
CONTENT_EXPORT extern const char kEnableAcceleratedOverflowScroll[];
CONTENT_EXPORT extern const char kEnableLayerSquashing[];
CONTENT_EXPORT extern const char kEnableContainerCulling[];
extern const char kEnableAccessibilityLogging[];
CONTENT_EXPORT extern const char kEnableBeginFrameScheduling[];
CONTENT_EXPORT extern const char kEnableBrowserPluginForAllViewTypes[];
Expand Down
3 changes: 3 additions & 0 deletions content/renderer/web_preferences.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ void ApplyWebPreferences(const WebPreferences& prefs, WebView* web_view) {
// Enable deferred filter rendering if requested on the command line.
settings->setDeferredFiltersEnabled(prefs.deferred_filters_enabled);

// Enable container culling if requested on the command line.
settings->setContainerCullingEnabled(prefs.container_culling_enabled);

// Enable gesture tap highlight if requested on the command line.
settings->setGestureTapHighlightEnabled(prefs.gesture_tap_highlight_enabled);

Expand Down
1 change: 1 addition & 0 deletions webkit/common/webpreferences.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ WebPreferences::WebPreferences()
accelerated_2d_canvas_msaa_sample_count(0),
accelerated_filters_enabled(false),
deferred_filters_enabled(false),
container_culling_enabled(false),
gesture_tap_highlight_enabled(false),
accelerated_compositing_for_plugins_enabled(false),
allow_displaying_insecure_content(true),
Expand Down
1 change: 1 addition & 0 deletions webkit/common/webpreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ struct WEBKIT_COMMON_EXPORT WebPreferences {
int accelerated_2d_canvas_msaa_sample_count;
bool accelerated_filters_enabled;
bool deferred_filters_enabled;
bool container_culling_enabled;
bool gesture_tap_highlight_enabled;
bool accelerated_compositing_for_plugins_enabled;
bool allow_displaying_insecure_content;
Expand Down

0 comments on commit 1845a7f

Please sign in to comment.