Show the number of OMT animations on a layer in the layer dump draft
authorBotond Ballo <botond@mozilla.com>
Wed, 20 Jul 2016 14:53:38 -0400
changeset 397397 3e64e3ab44cdb0087787d2016bd2a3d623cb0c57
parent 397396 f2f278675c2f28f79d92e709b8130ed64f9167a1
child 397398 eccc15e6ea7692f8c4b8f35d322edb8541309442
push id25288
push userbballo@mozilla.com
push dateFri, 05 Aug 2016 19:41:51 +0000
milestone50.0a1
Show the number of OMT animations on a layer in the layer dump MozReview-Commit-ID: KmG0TKEKZRR
gfx/layers/Layers.cpp
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -1987,16 +1987,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()) {