diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 22:12:36 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 22:12:36 +0000 |
commit | 499de56eca20067b4ee4c31ea0ed735376d67154 (patch) | |
tree | 75e40468ba2993f891120df72bba1e343038d743 /cc/layer_tree_host.cc | |
parent | e57edff777ac9678d37227aa73fd64ed4bcaaafc (diff) | |
download | chromium_src-499de56eca20067b4ee4c31ea0ed735376d67154.zip chromium_src-499de56eca20067b4ee4c31ea0ed735376d67154.tar.gz chromium_src-499de56eca20067b4ee4c31ea0ed735376d67154.tar.bz2 |
cc: Add command line flags for the various show rect debugging features.
Add command line flags for everything except showPaintRects, as this is
already a part of WebSettings and passed in via WebKit. This needs to be
resolved with the others once we sort out the future method of passing in
settings to the compositor.
The new flags are:
--show-property-changed-rects
--show-surface-damage-rects
--show-screenspace-rects
--show-replica-screenspace-rects
--show-occluding-rects
BUG=160643
R=enne,jamesr
Review URL: https://codereview.chromium.org/11366212
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167484 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_tree_host.cc')
-rw-r--r-- | cc/layer_tree_host.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc index b969201..ade46eb 100644 --- a/cc/layer_tree_host.cc +++ b/cc/layer_tree_host.cc @@ -4,6 +4,7 @@ #include "cc/layer_tree_host.h" +#include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/message_loop.h" #include "cc/font_atlas.h" @@ -21,6 +22,7 @@ #include "cc/overdraw_metrics.h" #include "cc/settings.h" #include "cc/single_thread_proxy.h" +#include "cc/switches.h" #include "cc/thread.h" #include "cc/thread_proxy.h" #include "cc/tree_synchronizer.h" @@ -51,6 +53,12 @@ LayerTreeSettings::LayerTreeSettings() , maxUntiledLayerSize(gfx::Size(512, 512)) , minimumOcclusionTrackingSize(gfx::Size(160, 160)) { + // TODO(danakj): Move this to chromium when we don't go through the WebKit API anymore. + showPropertyChangedRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowPropertyChangedRects); + showSurfaceDamageRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowSurfaceDamageRects); + showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowScreenSpaceRects); + showReplicaScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); + showOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowOccludingRects); } LayerTreeSettings::~LayerTreeSettings() |