Bug 1055760 - Don't pass an out-ref for a parameter that doesn't change. r=botond
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 27 Aug 2014 22:13:40 -0400
changeset 202040 933f499c25860f89d6429b5b8e76b0e6d58ba71d
parent 202039 33fad6086b326296fcc057a116acdd77a14531eb
child 202041 2b593e85dbdb4e0de26d9eb5f9732d653e07e181
push id27389
push usercbook@mozilla.com
push dateThu, 28 Aug 2014 11:02:32 +0000
treeherdermozilla-central@70c1c94cfaec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1055760
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 1055760 - Don't pass an out-ref for a parameter that doesn't change. r=botond
gfx/layers/apz/src/APZCTreeManager.cpp
gfx/layers/apz/src/APZCTreeManager.h
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -206,17 +206,17 @@ ComputeTouchSensitiveRegion(GeckoContent
 
 AsyncPanZoomController*
 APZCTreeManager::PrepareAPZCForLayer(const Layer* aLayer,
                                      const FrameMetrics& aMetrics,
                                      uint64_t aLayersId,
                                      const gfx::Matrix4x4& aAncestorTransform,
                                      const nsIntRegion& aObscured,
                                      AsyncPanZoomController*& aOutParent,
-                                     AsyncPanZoomController*& aOutNextSibling,
+                                     AsyncPanZoomController* aNextSibling,
                                      TreeBuildingState& aState)
 {
   if (!aMetrics.IsScrollable()) {
     return nullptr;
   }
 
   const CompositorParent::LayerTreeState* state = CompositorParent::GetIndirectShadowTree(aLayersId);
   if (!(state && state->mController.get())) {
@@ -303,18 +303,18 @@ APZCTreeManager::PrepareAPZCForLayer(con
     mApzcTreeLog << "APZC " << guid
                  << "\tcb=" << aMetrics.mCompositionBounds
                  << "\tsr=" << aMetrics.mScrollableRect
                  << (aLayer->GetVisibleRegion().IsEmpty() ? "\tscrollinfo" : "")
                  << (apzc->HasScrollgrab() ? "\tscrollgrab" : "")
                  << "\t" << aLayer->GetContentDescription();
 
     // Bind the APZC instance into the tree of APZCs
-    if (aOutNextSibling) {
-      aOutNextSibling->SetPrevSibling(apzc);
+    if (aNextSibling) {
+      aNextSibling->SetPrevSibling(apzc);
     } else if (aOutParent) {
       aOutParent->SetLastChild(apzc);
     } else {
       mRootApzc = apzc;
       apzc->MakeRoot();
     }
 
     // For testing, log the parent scroll id of every APZC that has a
--- a/gfx/layers/apz/src/APZCTreeManager.h
+++ b/gfx/layers/apz/src/APZCTreeManager.h
@@ -379,17 +379,17 @@ private:
                                         const ZoomConstraints& aConstraints);
 
   AsyncPanZoomController* PrepareAPZCForLayer(const Layer* aLayer,
                                               const FrameMetrics& aMetrics,
                                               uint64_t aLayersId,
                                               const gfx::Matrix4x4& aAncestorTransform,
                                               const nsIntRegion& aObscured,
                                               AsyncPanZoomController*& aOutParent,
-                                              AsyncPanZoomController*& aOutNextSibling,
+                                              AsyncPanZoomController* aNextSibling,
                                               TreeBuildingState& aState);
 
   /**
    * Recursive helper function to build the APZC tree. The tree of APZC instances has
    * the same shape as the layer tree, but excludes all the layers that are not scrollable.
    * Note that this means APZCs corresponding to layers at different depths in the tree
    * may end up becoming siblings. It also means that the "root" APZC may have siblings.
    * This function walks the layer tree backwards through siblings and constructs the APZC