Bug 1077119 - Remove the gfxContext methods for getting various types of path extents. r=Bas
authorJonathan Watt <jwatt@jwatt.org>
Sat, 04 Oct 2014 12:13:29 +0100
changeset 208820 1bf8fd2808865142fd65634633083b1072de8930
parent 208819 21e9a5b9a4e388a343f06ed15b430cf5e47436f5
child 208821 b2afb3535ace8584682b5c7965ea14d1e5b80280
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersBas
bugs1077119
milestone35.0a1
Bug 1077119 - Remove the gfxContext methods for getting various types of path extents. r=Bas
gfx/thebes/gfxContext.cpp
gfx/thebes/gfxContext.h
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -1154,48 +1154,16 @@ bool
 gfxContext::PointInStroke(const gfxPoint& pt)
 {
   EnsurePath();
   return mPath->StrokeContainsPoint(CurrentState().strokeOptions,
                                     ToPoint(pt),
                                     Matrix());
 }
 
-gfxRect
-gfxContext::GetUserPathExtent()
-{
-  if (mPathIsRect) {
-    return ThebesRect(mTransform.TransformBounds(mRect));
-  }
-  EnsurePath();
-  return ThebesRect(mPath->GetBounds());
-}
-
-gfxRect
-gfxContext::GetUserFillExtent()
-{
-  if (mPathIsRect) {
-    return ThebesRect(mTransform.TransformBounds(mRect));
-  }
-  EnsurePath();
-  return ThebesRect(mPath->GetBounds());
-}
-
-gfxRect
-gfxContext::GetUserStrokeExtent()
-{
-  if (mPathIsRect) {
-    Rect rect = mRect;
-    rect.Inflate(CurrentState().strokeOptions.mLineWidth / 2);
-    return ThebesRect(mTransform.TransformBounds(rect));
-  }
-  EnsurePath();
-  return ThebesRect(mPath->GetStrokedBounds(CurrentState().strokeOptions, mTransform));
-}
-
 bool
 gfxContext::HasError()
 {
   // As far as this is concerned, an Azure context is never in error.
   return false;
 }
 
 void
--- a/gfx/thebes/gfxContext.h
+++ b/gfx/thebes/gfxContext.h
@@ -597,23 +597,16 @@ public:
     PopGroupToSurface(mozilla::gfx::Matrix* aMatrix);
 
     /**
      ** Hit Testing - check if given point is in the current path
      **/
     bool PointInFill(const gfxPoint& pt);
     bool PointInStroke(const gfxPoint& pt);
 
-    /**
-     ** Extents - returns user space extent of current path
-     **/
-    gfxRect GetUserPathExtent();
-    gfxRect GetUserFillExtent();
-    gfxRect GetUserStrokeExtent();
-
     mozilla::gfx::Point GetDeviceOffset() const;
 
     /**
      ** Flags
      **/
 
     enum {
         /* If this flag is set, operators other than CLEAR, SOURCE, or