Bug 1321885 - Show the number of OMT animations on a layer in the layer dump. r=mstange draft
authorBotond Ballo <botond@mozilla.com>
Wed, 20 Jul 2016 14:53:38 -0400
changeset 447179 b601b7e605c7ad0ba0d09c9c1e2405282fe0d700
parent 447178 7fc17e00fddbdbe4856c08a78729e8467a1f9571
child 447180 effeb33dca0ea5ed6c4e4fa2120383c3b4d28d0b
push id38008
push userbballo@mozilla.com
push dateFri, 02 Dec 2016 22:13:11 +0000
reviewersmstange
bugs1321885
milestone53.0a1
Bug 1321885 - Show the number of OMT animations on a layer in the layer dump. r=mstange MozReview-Commit-ID: KmG0TKEKZRR
gfx/layers/Layers.cpp
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -1966,16 +1966,19 @@ Layer::PrintInfo(std::stringstream& aStr
     aStream << nsPrintfCString(" [mMaskLayer=%p]", mMaskLayer.get()).get();
   }
   for (uint32_t i = 0; i < mScrollMetadata.Length(); i++) {
     if (!mScrollMetadata[i].IsDefault()) {
       aStream << nsPrintfCString(" [metrics%d=", i).get();
       AppendToString(aStream, mScrollMetadata[i], "", "]");
     }
   }
+  if (!mAnimations.IsEmpty()) {
+    aStream << nsPrintfCString(" [%d animations]", (int) mAnimations.Length()).get();
+  }
 }
 
 // The static helper function sets the transform matrix into the packet
 static void
 DumpTransform(layerscope::LayersPacket::Layer::Matrix* aLayerMatrix, const Matrix4x4& aMatrix)
 {
   aLayerMatrix->set_is2d(aMatrix.Is2D());
   if (aMatrix.Is2D()) {