Bug 1203992 - Distinguish between SingleTiledContentClient and MultiTiledContentClient in the layer tree dump. r=nical
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 14 Sep 2015 11:02:11 -0400
changeset 294930 edabe4800045ffe74d5d794f427945cb9345620d
parent 294929 b89b4f875debe615c069a0109311570ae7774aa6
child 294931 5af5ff26d3858268b19ddfbd15306b6ed07a3816
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1203992
milestone43.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 1203992 - Distinguish between SingleTiledContentClient and MultiTiledContentClient in the layer tree dump. r=nical
gfx/layers/client/SingleTiledContentClient.cpp
gfx/layers/client/TiledContentClient.cpp
gfx/layers/client/TiledContentClient.h
--- a/gfx/layers/client/SingleTiledContentClient.cpp
+++ b/gfx/layers/client/SingleTiledContentClient.cpp
@@ -9,17 +9,17 @@ namespace mozilla {
 
 using namespace gfx;
 
 namespace layers {
 
 
 SingleTiledContentClient::SingleTiledContentClient(ClientTiledPaintedLayer* aPaintedLayer,
                                                    ClientLayerManager* aManager)
-  : TiledContentClient(aManager)
+  : TiledContentClient(aManager, "Single")
 {
   MOZ_COUNT_CTOR(SingleTiledContentClient);
 
   mTiledBuffer = new ClientSingleTiledLayerBuffer(aPaintedLayer, this, aManager);
 }
 
 void
 SingleTiledContentClient::ClearCachedResources()
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -84,17 +84,17 @@ namespace mozilla {
 
 using namespace gfx;
 
 namespace layers {
 
 
 MultiTiledContentClient::MultiTiledContentClient(ClientTiledPaintedLayer* aPaintedLayer,
                                                  ClientLayerManager* aManager)
-  : TiledContentClient(aManager)
+  : TiledContentClient(aManager, "Multi")
 {
   MOZ_COUNT_CTOR(MultiTiledContentClient);
 
   mTiledBuffer = ClientMultiTiledLayerBuffer(aPaintedLayer, this, aManager,
                                              &mSharedFrameMetricsHelper);
   mLowPrecisionTiledBuffer = ClientMultiTiledLayerBuffer(aPaintedLayer, this, aManager,
                                                          &mSharedFrameMetricsHelper);
 
@@ -1664,17 +1664,17 @@ ClientMultiTiledLayerBuffer::Progressive
   // to the shadow layer to upload.
   return isBufferChanged;
 }
 
 void
 TiledContentClient::PrintInfo(std::stringstream& aStream, const char* aPrefix)
 {
   aStream << aPrefix;
-  aStream << nsPrintfCString("TiledContentClient (0x%p)", this).get();
+  aStream << nsPrintfCString("%sTiledContentClient (0x%p)", mName, this).get();
 
   if (profiler_feature_active("displaylistdump")) {
     nsAutoCString pfx(aPrefix);
     pfx += "  ";
 
     Dump(aStream, pfx.get(), false);
   }
 }
--- a/gfx/layers/client/TiledContentClient.h
+++ b/gfx/layers/client/TiledContentClient.h
@@ -586,18 +586,20 @@ private:
                                       nsIntRegion& aRegionToPaint,
                                       BasicTiledLayerPaintData* aPaintData,
                                       bool aIsRepeated);
 };
 
 class TiledContentClient : public CompositableClient
 {
 public:
-  TiledContentClient(ClientLayerManager* aManager)
+  TiledContentClient(ClientLayerManager* aManager,
+                     const char* aName = "")
     : CompositableClient(aManager->AsShadowForwarder())
+    , mName(aName)
   {}
 
 protected:
   ~TiledContentClient()
   {}
 
 public:
   virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
@@ -615,16 +617,19 @@ public:
   virtual ClientTiledLayerBuffer* GetTiledBuffer() = 0;
   virtual ClientTiledLayerBuffer* GetLowPrecisionTiledBuffer() = 0;
 
   enum TiledBufferType {
     TILED_BUFFER,
     LOW_PRECISION_TILED_BUFFER
   };
   virtual void UpdatedBuffer(TiledBufferType aType) = 0;
+
+private:
+  const char* mName;
 };
 
 /**
  * An implementation of TiledContentClient that supports
  * multiple tiles and a low precision buffer.
  */
 class MultiTiledContentClient : public TiledContentClient
 {