summaryrefslogtreecommitdiffstats
path: root/cc/layer_tree_host.h
diff options
context:
space:
mode:
authoregraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 01:55:20 +0000
committeregraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 01:55:20 +0000
commitf511afb6940373a304131e0a547bcfe17749d0db (patch)
treeaa7f9c26f79772544ebb6951c48ea8dc554750c8 /cc/layer_tree_host.h
parent9ef82fdaa55d450e12446d6a1c3b9394ade1f7d6 (diff)
downloadchromium_src-f511afb6940373a304131e0a547bcfe17749d0db.zip
chromium_src-f511afb6940373a304131e0a547bcfe17749d0db.tar.gz
chromium_src-f511afb6940373a304131e0a547bcfe17749d0db.tar.bz2
This change puts all settings for debugging/HudLayer in a new LayerTreeDebugState structure. This allows for easier toggling of debug settings. Commandline switches get OR'ed in.
BUG= Review URL: https://chromiumcodereview.appspot.com/11414017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170345 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_tree_host.h')
-rw-r--r--cc/layer_tree_host.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/cc/layer_tree_host.h b/cc/layer_tree_host.h
index c140b31..6e8795f 100644
--- a/cc/layer_tree_host.h
+++ b/cc/layer_tree_host.h
@@ -50,14 +50,14 @@ class HeadsUpDisplayLayer;
class Region;
struct ScrollAndScaleSet;
-struct CC_EXPORT LayerTreeSettings {
- LayerTreeSettings();
- ~LayerTreeSettings();
+struct CC_EXPORT LayerTreeDebugState {
+ LayerTreeDebugState();
+ ~LayerTreeDebugState();
- bool acceleratePainting;
- bool implSidePainting;
- bool showDebugBorders;
+ bool showFPSCounter;
bool showPlatformLayerTree;
+ bool showDebugBorders;
+
bool showPaintRects;
bool showPropertyChangedRects;
bool showSurfaceDamageRects;
@@ -65,6 +65,20 @@ struct CC_EXPORT LayerTreeSettings {
bool showReplicaScreenSpaceRects;
bool showOccludingRects;
bool showNonOccludingRects;
+
+ bool showHudInfo() const;
+ bool showHudRects() const;
+
+ static bool equal(const LayerTreeDebugState& a, const LayerTreeDebugState& b);
+ static LayerTreeDebugState unite(const LayerTreeDebugState& a, const LayerTreeDebugState& b);
+};
+
+struct CC_EXPORT LayerTreeSettings {
+ LayerTreeSettings();
+ ~LayerTreeSettings();
+
+ bool acceleratePainting;
+ bool implSidePainting;
bool renderVSyncEnabled;
bool perTilePaintingEnabled;
bool partialSwapEnabled;
@@ -78,8 +92,7 @@ struct CC_EXPORT LayerTreeSettings {
gfx::Size maxUntiledLayerSize;
gfx::Size minimumOcclusionTrackingSize;
- bool showDebugInfo() const { return showPlatformLayerTree || showDebugRects(); }
- bool showDebugRects() const { return showPaintRects || showPropertyChangedRects || showSurfaceDamageRects || showScreenSpaceRects || showReplicaScreenSpaceRects || showOccludingRects || showNonOccludingRects; }
+ LayerTreeDebugState initialDebugState;
};
// Provides information on an Impl's rendering capabilities back to the LayerTreeHost
@@ -183,6 +196,9 @@ public:
const LayerTreeSettings& settings() const { return m_settings; }
+ void setDebugState(const LayerTreeDebugState& debugState);
+ const LayerTreeDebugState& debugState() const { return m_debugState; }
+
void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& deviceViewportSize);
const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; }
@@ -221,7 +237,6 @@ public:
void setDeviceScaleFactor(float);
float deviceScaleFactor() const { return m_deviceScaleFactor; }
- void setShowFPSCounter(bool show);
void setFontAtlas(scoped_ptr<FontAtlas>);
HeadsUpDisplayLayer* hudLayer() const { return m_hudLayer.get(); }
@@ -278,6 +293,7 @@ private:
scoped_ptr<PrioritizedResource> m_surfaceMemoryPlaceholder;
LayerTreeSettings m_settings;
+ LayerTreeDebugState m_debugState;
gfx::Size m_layoutViewportSize;
gfx::Size m_deviceViewportSize;