Bug 1554985 - Dump the render root boundary information when dumping WR scroll data. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Sun, 30 Jun 2019 01:37:22 +0000
changeset 540400 e16eda1824f7998a06c63e2c3220a10866d8f638
parent 540399 8edcb5f6ceff9cdd1944c32889e3f13adbcc0f8a
child 540401 5ebb4441aa24eb6cbe8dad58d232004a3ea11b28
push id11529
push userarchaeopteryx@coole-files.de
push dateThu, 04 Jul 2019 15:22:33 +0000
treeherdermozilla-beta@ebb510a784b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1554985
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1554985 - Dump the render root boundary information when dumping WR scroll data. r=jrmuizel Depends on D36385 Differential Revision: https://phabricator.services.mozilla.com/D36386
gfx/layers/wr/RenderRootBoundary.h
gfx/layers/wr/WebRenderScrollData.cpp
--- a/gfx/layers/wr/RenderRootBoundary.h
+++ b/gfx/layers/wr/RenderRootBoundary.h
@@ -2,16 +2,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GFX_RENDERROOTBOUNDARY_H
 #define GFX_RENDERROOTBOUNDARY_H
 
 #include "mozilla/webrender/WebRenderTypes.h"
 
+#include <string>
+#include <sstream>
+
 namespace mozilla {
 namespace layers {
 
 // clang-format off
 // A display list can have multiple nsDisplayRenderRoot instances in it, one
 // at each point that the display list transitions from being in one render root
 // to another. In particular, this means that a display list can transition
 // from e.g. the "Default" render root to the "Content" render root multiple
@@ -69,16 +72,22 @@ class RenderRootBoundary {
   bool operator==(const RenderRootBoundary& aOther) const {
     return mChildType == aOther.mChildType && mId == aOther.mId;
   }
 
   friend struct IPC::ParamTraits<RenderRootBoundary>;
   // constructor for IPC
   RenderRootBoundary() = default;
 
+  std::string ToString() const {
+    std::stringstream str;
+    str << "childType=" << (int)mChildType << "; id=" << mId;
+    return str.str();
+  }
+
  private:
   wr::RenderRoot mChildType;
   // The id is what distinguishes different transition points within a display
   // list (i.e. what would be different in C, D, and E in the example above).
   uint64_t mId;
 };
 
 }  // namespace layers
--- a/gfx/layers/wr/WebRenderScrollData.cpp
+++ b/gfx/layers/wr/WebRenderScrollData.cpp
@@ -126,16 +126,24 @@ void WebRenderLayerScrollData::Dump(cons
                 Stringify(mAncestorTransform).c_str());
   printf_stderr("  transform: %s perspective: %d visible: %s\n",
                 Stringify(mTransform).c_str(), mTransformIsPerspective,
                 Stringify(mVisibleRegion).c_str());
   printf_stderr("  event regions override: 0x%x\n", mEventRegionsOverride);
   if (mReferentId) {
     printf_stderr("  ref layers id: 0x%" PRIx64 "\n", uint64_t(*mReferentId));
   }
+  if (mBoundaryRoot) {
+    printf_stderr("  boundary root for: %s\n",
+                  mBoundaryRoot->ToString().c_str());
+  }
+  if (mReferentRenderRoot) {
+    printf_stderr("  ref renderroot: %s\n",
+                  mReferentRenderRoot->ToString().c_str());
+  }
   printf_stderr("  scrollbar type: %d animation: %" PRIx64 "\n",
                 (int)mScrollbarData.mScrollbarLayerType,
                 mScrollbarAnimationId.valueOr(0));
   printf_stderr("  fixed pos container: %" PRIu64 "\n",
                 mFixedPosScrollContainerId);
 }
 
 WebRenderScrollData::WebRenderScrollData()