summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-13 22:12:36 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-13 22:12:36 +0000
commit499de56eca20067b4ee4c31ea0ed735376d67154 (patch)
tree75e40468ba2993f891120df72bba1e343038d743 /cc
parente57edff777ac9678d37227aa73fd64ed4bcaaafc (diff)
downloadchromium_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')
-rw-r--r--cc/layer_tree_host.cc8
-rw-r--r--cc/switches.cc19
-rw-r--r--cc/switches.h5
3 files changed, 32 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()
diff --git a/cc/switches.cc b/cc/switches.cc
index be81100..5302ade 100644
--- a/cc/switches.cc
+++ b/cc/switches.cc
@@ -29,6 +29,25 @@ const char kImplSidePainting[] = "impl-side-painting";
// content (i.e. jank) instead of showing checkerboards for missing content.
const char kJankInsteadOfCheckerboard[] = "jank-instead-of-checkerboard";
+// Show rects in the HUD around layers whose properties have changed.
+const char kShowPropertyChangedRects[] = "show-property-changed-rects";
+
+// Show rects in the HUD around damage as it is recorded into each render
+// surface.
+const char kShowSurfaceDamageRects[] = "show-surface-damage-rects";
+
+// Show rects in the HUD around the screen-space transformed bounds of every
+// layer.
+const char kShowScreenSpaceRects[] = "show-screenspace-rects";
+
+// Show rects in the HUD around the screen-space transformed bounds of every
+// layer's replica, when they have one.
+const char kShowReplicaScreenSpaceRects[] = "show-replica-screenspace-rects";
+
+// Show rects in the HUD wherever something is known to be drawn opaque and is
+// considered occluding the pixels behind it.
+const char kShowOccludingRects[] = "show-occluding-rects";
+
// Show metrics about overdraw in about:tracing recordings, such as the number
// of pixels culled, and the number of pixels drawn, for each frame.
const char kTraceOverdraw[] = "trace-overdraw";
diff --git a/cc/switches.h b/cc/switches.h
index 839e36b..347c495 100644
--- a/cc/switches.h
+++ b/cc/switches.h
@@ -22,6 +22,11 @@ CC_EXPORT extern const char kEnablePerTilePainting[];
CC_EXPORT extern const char kEnablePinchInCompositor[];
CC_EXPORT extern const char kImplSidePainting[];
CC_EXPORT extern const char kJankInsteadOfCheckerboard[];
+CC_EXPORT extern const char kShowPropertyChangedRects[];
+CC_EXPORT extern const char kShowSurfaceDamageRects[];
+CC_EXPORT extern const char kShowScreenSpaceRects[];
+CC_EXPORT extern const char kShowReplicaScreenSpaceRects[];
+CC_EXPORT extern const char kShowOccludingRects[];
CC_EXPORT extern const char kTraceOverdraw[];
} // namespace switches