Bug 897105 - Part 1: Add RectTyped::operator== to allow use in IPDL structs. r=roc
authorCorey Ford <cford@mozilla.com>
Wed, 11 Sep 2013 21:09:43 -0700
changeset 159927 6b69bc8e40dd3c20dcbcaba7c7f44e6cf6653ee3
parent 159926 b1d65f6b9c1e431131a8deeee914d041c3c28077
child 159928 7bb106e846bb2589583eb7ad9868e389cf29a30a
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs897105
milestone26.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 897105 - Part 1: Add RectTyped::operator== to allow use in IPDL structs. r=roc
gfx/2d/Rect.h
--- a/gfx/2d/Rect.h
+++ b/gfx/2d/Rect.h
@@ -119,16 +119,22 @@ struct RectTyped :
 
     static RectTyped<units> FromUnknownRect(const RectTyped<UnknownUnits>& rect) {
         return RectTyped<units>(rect.x, rect.y, rect.width, rect.height);
     }
 
     RectTyped<UnknownUnits> ToUnknownRect() const {
         return RectTyped<UnknownUnits>(this->x, this->y, this->width, this->height);
     }
+
+    // This is here only to keep IPDL-generated code happy. DO NOT USE.
+    bool operator==(const RectTyped<units>& aRect) const
+    {
+      return RectTyped<units>::IsEqualEdges(aRect);
+    }
 };
 typedef RectTyped<UnknownUnits> Rect;
 
 template<class units>
 IntRectTyped<units> RoundedToInt(const RectTyped<units>& aRect)
 {
   return IntRectTyped<units>(int32_t(floorf(aRect.x + 0.5f)),
                              int32_t(floorf(aRect.y + 0.5f)),