Bug 1113781 - Only track layer decision with MOZ_DUMP_PAINTING and add a preference. r=mstange

This commit is contained in:
Benoit Girard 2014-12-31 15:21:58 -05:00
parent 98b7cc0e56
commit f7ad51e8cc
2 changed files with 7 additions and 2 deletions

View File

@ -271,6 +271,9 @@ private:
DECL_GFX_PREF(Live, "layers.draw-layer-info", DrawLayerInfo, bool, false);
DECL_GFX_PREF(Live, "layers.dump", LayersDump, bool, false);
DECL_GFX_PREF(Live, "layers.dump-texture", LayersDumpTexture, bool, false);
#ifdef MOZ_DUMP_PAINTING
DECL_GFX_PREF(Live, "layers.dump-decision", LayersDumpDecision, bool, false);
#endif
// 0 is "no change" for contrast, positive values increase it, negative values
// decrease it until we hit mid gray at -1 contrast, after that it gets weird.

View File

@ -278,8 +278,10 @@ public:
nsAutoCString mLog;
#define FLB_LOG_PAINTED_LAYER_DECISION(pld, ...) \
pld->mLog.AppendPrintf("\t\t\t\t"); \
pld->mLog.AppendPrintf(__VA_ARGS__);
if (gfxPrefs::LayersDumpDecision()) { \
pld->mLog.AppendPrintf("\t\t\t\t"); \
pld->mLog.AppendPrintf(__VA_ARGS__); \
}
#else
#define FLB_LOG_PAINTED_LAYER_DECISION(...)
#endif