Bug 1386218 - remove unused function gfxContext::HasComplexClip; r=jrmuizel
authorAmi <ami.bugzilla@gmail.com>
Wed, 02 Aug 2017 02:12:00 +0200
changeset 643328 092017bb63c960d8961e7cf29e024a68245bb2f5
parent 643327 a886c2a428f6f9093e0ec2bd979be4cc29df74f5
child 643329 495a724af85c6d8e1efe438334f8f711d9d250fd
push id73068
push usergpascutto@mozilla.com
push dateWed, 09 Aug 2017 16:52:24 +0000
reviewersjrmuizel
bugs1386218
milestone57.0a1
Bug 1386218 - remove unused function gfxContext::HasComplexClip; r=jrmuizel
gfx/thebes/gfxContext.cpp
gfx/thebes/gfxContext.h
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -606,30 +606,16 @@ gfxContext::GetClipExtents()
   Matrix mat = mTransform;
   mat.Invert();
   rect = mat.TransformBounds(rect);
 
   return ThebesRect(rect);
 }
 
 bool
-gfxContext::HasComplexClip() const
-{
-  for (int i = mStateStack.Length() - 1; i >= 0; i--) {
-    for (unsigned int c = 0; c < mStateStack[i].pushedClips.Length(); c++) {
-      const AzureState::PushedClip &clip = mStateStack[i].pushedClips[c];
-      if (clip.path || !clip.transform.IsRectilinear()) {
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-bool
 gfxContext::ExportClip(ClipExporter& aExporter)
 {
   for (unsigned int i = 0; i < mStateStack.Length(); i++) {
     for (unsigned int c = 0; c < mStateStack[i].pushedClips.Length(); c++) {
       AzureState::PushedClip &clip = mStateStack[i].pushedClips[c];
       gfx::Matrix transform = clip.transform;
       transform.PostTranslate(-GetDeviceOffset());
 
--- a/gfx/thebes/gfxContext.h
+++ b/gfx/thebes/gfxContext.h
@@ -379,21 +379,16 @@ public:
 
     /**
      * This will return the current bounds of the clip region in user
      * space.
      */
     gfxRect GetClipExtents();
 
     /**
-     * Whether the current clip is not a simple rectangle.
-     */
-    bool HasComplexClip() const;
-
-    /**
      * Returns true if the given rectangle is fully contained in the current clip.
      * This is conservative; it may return false even when the given rectangle is
      * fully contained by the current clip.
      */
     bool ClipContainsRect(const gfxRect& aRect);
 
      /**
       * Exports the current clip using the provided exporter.