Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4505)

Unified Diff: cc/layer_tree_host.h

Issue 11414017: cc: handling debug settings in new LayerTreeDebugState structure (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rewrote to LayerTreeSwitches Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_tree_host.cc » ('j') | cc/layer_tree_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698