Bug 1422057 - Adjust some logging-related things to be more useful. r?mstange
MozReview-Commit-ID: Idheevum5Fd
--- a/gfx/layers/wr/ScrollingLayersHelper.cpp
+++ b/gfx/layers/wr/ScrollingLayersHelper.cpp
@@ -11,16 +11,17 @@
#include "mozilla/layers/StackingContextHelper.h"
#include "mozilla/layers/WebRenderLayerManager.h"
#include "mozilla/webrender/WebRenderAPI.h"
#include "nsDisplayList.h"
#include "UnitTransforms.h"
#define SLH_LOG(...)
//#define SLH_LOG(...) printf_stderr("SLH: " __VA_ARGS__)
+//#define SLH_LOG(...) if (XRE_IsContentProcess()) printf_stderr("SLH: " __VA_ARGS__)
namespace mozilla {
namespace layers {
ScrollingLayersHelper::ScrollingLayersHelper()
: mManager(nullptr)
, mBuilder(nullptr)
{
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -10,16 +10,17 @@
#include "mozilla/webrender/RendererOGL.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/layers/CompositorThread.h"
#include "mozilla/widget/CompositorWidget.h"
#include "mozilla/layers/SynchronousTask.h"
#define WRDL_LOG(...)
//#define WRDL_LOG(...) printf_stderr("WRDL(%p): " __VA_ARGS__)
+//#define WRDL_LOG(...) if (XRE_IsContentProcess()) printf_stderr("WRDL(%p): " __VA_ARGS__)
namespace mozilla {
namespace wr {
using layers::Stringify;
class NewRenderer : public RendererEvent
{
--- a/layout/painting/DisplayItemClipChain.cpp
+++ b/layout/painting/DisplayItemClipChain.cpp
@@ -34,20 +34,19 @@ DisplayItemClipChain::Equal(const Displa
}
/* static */ nsCString
DisplayItemClipChain::ToString(const DisplayItemClipChain* aClipChain)
{
nsAutoCString str;
for (auto* sc = aClipChain; sc; sc = sc->mParent) {
if (sc->mASR) {
- str.AppendPrintf("<%s> [0x%p]", sc->mClip.ToString().get(), sc->mASR->mScrollableFrame);
-
+ str.AppendPrintf("0x%p <%s> [0x%p]", sc, sc->mClip.ToString().get(), sc->mASR->mScrollableFrame);
} else {
- str.AppendPrintf("<%s> [root asr]", sc->mClip.ToString().get());
+ str.AppendPrintf("0x%p <%s> [root asr]", sc, sc->mClip.ToString().get());
}
if (sc->mParent) {
str.AppendLiteral(", ");
}
}
return str;
}