Bug 1422057 - Adjust some logging-related things to be more useful. r?mstange draft
authorKartikaya Gupta <kgupta@mozilla.com>
Sat, 06 Jan 2018 09:52:57 -0500
changeset 716813 ebe05b6d8667ff08365e0298dfebdffb9ebcf7ea
parent 716807 ece8a96dfaa436c9bcf53105877b3923a264ae31
child 716814 19eba7048daaba8e263632ff259346ef54066c0f
push id94505
push userkgupta@mozilla.com
push dateSat, 06 Jan 2018 16:27:17 +0000
reviewersmstange
bugs1422057
milestone59.0a1
Bug 1422057 - Adjust some logging-related things to be more useful. r?mstange MozReview-Commit-ID: Idheevum5Fd
gfx/layers/wr/ScrollingLayersHelper.cpp
gfx/webrender_bindings/WebRenderAPI.cpp
layout/painting/DisplayItemClipChain.cpp
--- 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;
 }