Index: cc/layer_tree_host.h |
diff --git a/cc/layer_tree_host.h b/cc/layer_tree_host.h |
index 5056345d07c8fb6810413415eaf7fc2993842adf..c299dad710909f78007005ddaa295189c415c216 100644 |
--- a/cc/layer_tree_host.h |
+++ b/cc/layer_tree_host.h |
@@ -16,6 +16,7 @@ |
#include "cc/animation_events.h" |
#include "cc/cc_export.h" |
#include "cc/graphics_context.h" |
+#include "cc/heads_up_display_layer.h" |
#include "cc/layer_tree_host_client.h" |
#include "cc/layer_tree_host_common.h" |
#include "cc/occlusion_tracker.h" |
@@ -40,23 +41,22 @@ struct hash<WebKit::WebGraphicsContext3D*> { |
namespace cc { |
-class FontAtlas; |
class Layer; |
class LayerTreeHostImpl; |
class LayerTreeHostImplClient; |
class PrioritizedResourceManager; |
class ResourceUpdateQueue; |
-class HeadsUpDisplayLayer; |
class Region; |
struct ScrollAndScaleSet; |
-struct CC_EXPORT LayerTreeSettings { |
- LayerTreeSettings(); |
- ~LayerTreeSettings(); |
+struct CC_EXPORT LayerTreeSwitches { |
egraether
2012/11/22 00:23:15
New structure LayerTreeSwitches holds values that
danakj
2012/11/26 19:57:18
This is great. The only concern I have here is tha
danakj
2012/11/26 19:58:25
Nat suggested LayerTreeDebugState, which I like. L
|
+ LayerTreeSwitches(); |
+ ~LayerTreeSwitches(); |
- bool acceleratePainting; |
- bool showDebugBorders; |
+ bool showFPSCounter; |
bool showPlatformLayerTree; |
+ bool showDebugBorders; |
egraether
2012/11/22 00:23:15
Also holds showDebugBorders
|
+ |
bool showPaintRects; |
bool showPropertyChangedRects; |
bool showSurfaceDamageRects; |
@@ -64,6 +64,18 @@ struct CC_EXPORT LayerTreeSettings { |
bool showReplicaScreenSpaceRects; |
bool showOccludingRects; |
bool showNonOccludingRects; |
+ |
+ bool showHudInfo() const; |
+ bool showHudRects() const; |
danakj
2012/11/26 19:57:18
I like the name changes here a lot.
|
+ |
+ LayerTreeSwitches merge(const LayerTreeSwitches& other) const; |
danakj
2012/11/26 19:57:18
How about a static method that takes two instances
|
+}; |
+ |
+struct CC_EXPORT LayerTreeSettings { |
+ LayerTreeSettings(); |
+ ~LayerTreeSettings(); |
+ |
+ bool acceleratePainting; |
bool renderVSyncEnabled; |
bool perTilePaintingEnabled; |
bool partialSwapEnabled; |
@@ -77,8 +89,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; } |
+ LayerTreeSwitches initialSwitchSettings; |
egraether
2012/11/22 00:23:15
Initial switch values from the commandline get sto
danakj
2012/11/26 19:57:18
initialSwitchValues? (or initialToggleValues?)
"S
|
}; |
// Provides information on an Impl's rendering capabilities back to the LayerTreeHost |
@@ -182,6 +193,9 @@ public: |
const LayerTreeSettings& settings() const { return m_settings; } |
+ void setSwitches(const LayerTreeSwitches& switches); |
+ const LayerTreeSwitches& switches() const { return m_switches; } |
+ |
void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& deviceViewportSize); |
const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } |
@@ -216,7 +230,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(); } |
@@ -273,6 +286,7 @@ private: |
scoped_ptr<PrioritizedResource> m_surfaceMemoryPlaceholder; |
LayerTreeSettings m_settings; |
+ LayerTreeSwitches m_switches; |
gfx::Size m_layoutViewportSize; |
gfx::Size m_deviceViewportSize; |