Bug 1160566 - Change some return values to be reference-to-const. r=botond
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 07 May 2015 14:44:03 -0400
changeset 274240 bec29299cb7ec9108297c68fade1b0ddbb0873f0
parent 274239 c780203cf304b4649a15a42b1bd6e70e7cdf2197
child 274241 57f0b16030e9f7245a5cd8879e261e25354cfa7e
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1160566
milestone40.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 1160566 - Change some return values to be reference-to-const. r=botond
gfx/layers/FrameMetrics.h
--- a/gfx/layers/FrameMetrics.h
+++ b/gfx/layers/FrameMetrics.h
@@ -260,47 +260,47 @@ public:
     return mCompositionBounds;
   }
 
   void SetDisplayPort(const CSSRect& aDisplayPort)
   {
     mDisplayPort = aDisplayPort;
   }
 
-  CSSRect GetDisplayPort() const
+  const CSSRect& GetDisplayPort() const
   {
     return mDisplayPort;
   }
 
   void SetCriticalDisplayPort(const CSSRect& aCriticalDisplayPort)
   {
     mCriticalDisplayPort = aCriticalDisplayPort;
   }
 
-  CSSRect GetCriticalDisplayPort() const
+  const CSSRect& GetCriticalDisplayPort() const
   {
     return mCriticalDisplayPort;
   }
 
   void SetCumulativeResolution(const LayoutDeviceToLayerScale2D& aCumulativeResolution)
   {
     mCumulativeResolution = aCumulativeResolution;
   }
 
-  LayoutDeviceToLayerScale2D GetCumulativeResolution() const
+  const LayoutDeviceToLayerScale2D& GetCumulativeResolution() const
   {
     return mCumulativeResolution;
   }
 
   void SetDevPixelsPerCSSPixel(const CSSToLayoutDeviceScale& aDevPixelsPerCSSPixel)
   {
     mDevPixelsPerCSSPixel = aDevPixelsPerCSSPixel;
   }
 
-  CSSToLayoutDeviceScale GetDevPixelsPerCSSPixel() const
+  const CSSToLayoutDeviceScale& GetDevPixelsPerCSSPixel() const
   {
     return mDevPixelsPerCSSPixel;
   }
 
   void SetIsRoot(bool aIsRoot)
   {
     mIsRoot = aIsRoot;
   }
@@ -340,17 +340,17 @@ public:
     return mSmoothScrollOffset;
   }
 
   void SetZoom(const CSSToParentLayerScale2D& aZoom)
   {
     mZoom = aZoom;
   }
 
-  CSSToParentLayerScale2D GetZoom() const
+  const CSSToParentLayerScale2D& GetZoom() const
   {
     return mZoom;
   }
 
   void SetScrollOffsetUpdated(uint32_t aScrollGeneration)
   {
     mUpdateScrollOffset = true;
     mScrollGeneration = aScrollGeneration;
@@ -447,17 +447,17 @@ public:
     return mViewport;
   }
 
   void SetExtraResolution(const ScreenToLayerScale2D& aExtraResolution)
   {
     mExtraResolution = aExtraResolution;
   }
 
-  ScreenToLayerScale2D GetExtraResolution() const
+  const ScreenToLayerScale2D& GetExtraResolution() const
   {
     return mExtraResolution;
   }
 
   const gfxRGBA& GetBackgroundColor() const
   {
     return mBackgroundColor;
   }