Bug 1018387 - Log the composition bounds in layer dumps. r=Cwiiis, a=2.0+
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 09 Jun 2014 14:02:38 -0400
changeset 206855 5c4f6b4bbd6b345f20e12e51c401173c3406408d
parent 206854 3a5de06a61d895c4756ae6fb60c7a72572a7d2ff
child 206856 08315e8c55f37ce5cb0ceeebcbabbbcac43067fc
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCwiiis, 2
bugs1018387
milestone32.0a2
Bug 1018387 - Log the composition bounds in layer dumps. r=Cwiiis, a=2.0+
gfx/layers/LayersLogging.cpp
gfx/layers/LayersLogging.h
--- a/gfx/layers/LayersLogging.cpp
+++ b/gfx/layers/LayersLogging.cpp
@@ -113,16 +113,17 @@ AppendToString(nsACString& s, const nsIn
 }
 
 nsACString&
 AppendToString(nsACString& s, const FrameMetrics& m,
                const char* pfx, const char* sfx)
 {
   s += pfx;
   AppendToString(s, m.mViewport, "{ viewport=");
+  AppendToString(s, m.mCompositionBounds, " cb=");
   AppendToString(s, m.GetScrollOffset(), " viewportScroll=");
   AppendToString(s, m.mDisplayPort, " displayport=");
   AppendToString(s, m.mCriticalDisplayPort, " critdp=");
   AppendToString(s, m.mScrollableRect, " scrollableRect=");
   AppendToString(s, m.GetScrollId(), " scrollId=", " }");
   return s += sfx;
 }
 
--- a/gfx/layers/LayersLogging.h
+++ b/gfx/layers/LayersLogging.h
@@ -75,16 +75,28 @@ AppendToString(nsACString& s, const mozi
 {
   s += pfx;
   s.AppendPrintf(
     "(x=%f, y=%f, w=%f, h=%f)",
     r.x, r.y, r.width, r.height);
   return s += sfx;
 }
 
+template<class T>
+nsACString&
+AppendToString(nsACString& s, const mozilla::gfx::IntRectTyped<T>& r,
+               const char* pfx="", const char* sfx="")
+{
+  s += pfx;
+  s.AppendPrintf(
+    "(x=%d, y=%d, w=%d, h=%d)",
+    r.x, r.y, r.width, r.height);
+  return s += sfx;
+}
+
 nsACString&
 AppendToString(nsACString& s, const nsIntRegion& r,
                const char* pfx="", const char* sfx="");
 
 nsACString&
 AppendToString(nsACString& s, const nsIntSize& sz,
                const char* pfx="", const char* sfx="");