Bug 1416011 - Make the RoundedRect constructor take const references. r=kats
authorMarkus Stange <mstange@themasta.com>
Thu, 09 Nov 2017 17:07:32 -0500
changeset 444482 53edee7389e5bb34e564a37fa10b8b33edcd7af9
parent 444481 79f2b6f0c44c6d61f2ac2aa92c73882aff7d7e29
child 444483 5a5808da985bb0ff2cc705dd83feb54323cb0a17
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1416011
milestone58.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 1416011 - Make the RoundedRect constructor take const references. r=kats MozReview-Commit-ID: HC9JKt2EBdq
gfx/thebes/RoundedRect.h
--- a/gfx/thebes/RoundedRect.h
+++ b/gfx/thebes/RoundedRect.h
@@ -15,17 +15,22 @@ namespace mozilla {
  *
  * This can represent a rectangle with a different pair of radii on each corner.
  *
  * Note: CoreGraphics and Direct2D only support rounded rectangle with the same
  * radii on all corners. However, supporting CSS's border-radius requires the extra flexibility. */
 struct RoundedRect {
     typedef mozilla::gfx::RectCornerRadii RectCornerRadii;
 
-    RoundedRect(gfxRect &aRect, RectCornerRadii &aCorners) : rect(aRect), corners(aCorners) { }
+    RoundedRect(const gfxRect& aRect, const RectCornerRadii& aCorners)
+      : rect(aRect)
+      , corners(aCorners)
+    {
+    }
+
     void Deflate(gfxFloat aTopWidth, gfxFloat aBottomWidth, gfxFloat aLeftWidth, gfxFloat aRightWidth) {
         // deflate the internal rect
         rect.x += aLeftWidth;
         rect.y += aTopWidth;
         rect.SetWidth(std::max(0., rect.Width() - aLeftWidth - aRightWidth));
         rect.SetHeight(std::max(0., rect.Height() - aTopWidth - aBottomWidth));
 
         corners.radii[mozilla::eCornerTopLeft].width =