Bug 965022 - Avoid passing a TimeStamp to printf in PrintUniformityInfo. r=mchang
☠☠ backed out by 894b7372561d ☠ ☠
authorBotond Ballo <botond@mozilla.com>
Mon, 25 Aug 2014 17:24:21 -0400
changeset 223358 f747fd154739dbf37461c84bf41b365d9463ea44
parent 223357 f076faf3c282c1d856a078e1bd4f27292ca4b1f9
child 223359 a34ae046c94729021676108c4c69e04fcaa3c3aa
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang
bugs965022
milestone34.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 965022 - Avoid passing a TimeStamp to printf in PrintUniformityInfo. r=mchang
gfx/layers/composite/ContainerLayerComposite.cpp
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -109,16 +109,18 @@ static void DrawLayerInfo(const RenderTa
   nsIntPoint topLeft = visibleRegion.GetBounds().TopLeft();
   aManager->GetTextRenderer()->RenderText(ss.str().c_str(), gfx::IntPoint(topLeft.x, topLeft.y),
                                           aLayer->GetEffectiveTransform(), 16,
                                           maxWidth);
 }
 
 static void PrintUniformityInfo(Layer* aLayer)
 {
+  static TimeStamp t0 = TimeStamp::Now();
+
   // Don't want to print a log for smaller layers
   if (aLayer->GetEffectiveVisibleRegion().GetBounds().width < 300 ||
       aLayer->GetEffectiveVisibleRegion().GetBounds().height < 300) {
     return;
   }
 
   FrameMetrics frameMetrics = aLayer->GetFrameMetrics();
   if (!frameMetrics.IsScrollable()) {
@@ -128,17 +130,18 @@ static void PrintUniformityInfo(Layer* a
   AsyncPanZoomController* apzc = aLayer->GetAsyncPanZoomController();
   if (apzc) {
     ViewTransform asyncTransform, overscrollTransform;
     ScreenPoint scrollOffset;
     apzc->SampleContentTransformForFrame(&asyncTransform,
                                          scrollOffset,
                                          &overscrollTransform);
     printf_stderr("UniformityInfo Layer_Move %llu %p %f, %f\n",
-          TimeStamp::Now(), aLayer, scrollOffset.x.value, scrollOffset.y.value);
+        (unsigned long long)(TimeStamp::Now() - t0).ToMilliseconds(), aLayer,
+        scrollOffset.x.value, scrollOffset.y.value);
   }
 }
 
 /* all of the per-layer prepared data we need to maintain */
 struct PreparedLayer
 {
   PreparedLayer(LayerComposite *aLayer, RenderTargetIntRect aClipRect, bool aRestoreVisibleRegion, nsIntRegion &aVisibleRegion) :
     mLayer(aLayer), mClipRect(aClipRect), mRestoreVisibleRegion(aRestoreVisibleRegion), mSavedVisibleRegion(aVisibleRegion) {}