Bug 1098389. Remove ClipToRegionSnapped. r=roc
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 14 Nov 2014 10:46:02 -0500
changeset 215864 31f120912bfbe0b1e4c483f4fcada7a9718ab826
parent 215863 7fb233e1b1c4459395ee4c43ff4b5ce8fadd7e32
child 215865 e2efedec2d60562ea845f32740f8db2703337871
push id27829
push usergszorc@mozilla.com
push dateSat, 15 Nov 2014 22:34:49 +0000
treeherderautoland@19f75e1211e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1098389
milestone36.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 1098389. Remove ClipToRegionSnapped. r=roc We don't use this anymore.
gfx/thebes/gfxUtils.cpp
gfx/thebes/gfxUtils.h
--- a/gfx/thebes/gfxUtils.cpp
+++ b/gfx/thebes/gfxUtils.cpp
@@ -677,32 +677,30 @@ gfxUtils::ImageFormatToDepth(gfxImageFor
             return 16;
         default:
             break;
     }
     return 0;
 }
 
 static void
-PathFromRegionInternal(gfxContext* aContext, const nsIntRegion& aRegion,
-                       bool aSnap)
+PathFromRegionInternal(gfxContext* aContext, const nsIntRegion& aRegion)
 {
   aContext->NewPath();
   nsIntRegionRectIterator iter(aRegion);
   const nsIntRect* r;
   while ((r = iter.Next()) != nullptr) {
-    aContext->Rectangle(gfxRect(r->x, r->y, r->width, r->height), aSnap);
+    aContext->Rectangle(gfxRect(r->x, r->y, r->width, r->height));
   }
 }
 
 static void
-ClipToRegionInternal(gfxContext* aContext, const nsIntRegion& aRegion,
-                     bool aSnap)
+ClipToRegionInternal(gfxContext* aContext, const nsIntRegion& aRegion)
 {
-  PathFromRegionInternal(aContext, aRegion, aSnap);
+  PathFromRegionInternal(aContext, aRegion);
   aContext->Clip();
 }
 
 static TemporaryRef<Path>
 PathFromRegionInternal(DrawTarget* aTarget, const nsIntRegion& aRegion)
 {
   RefPtr<PathBuilder> pb = aTarget->CreatePathBuilder();
   nsIntRegionRectIterator iter(aRegion);
@@ -730,31 +728,25 @@ ClipToRegionInternal(DrawTarget* aTarget
 
   RefPtr<Path> path = PathFromRegionInternal(aTarget, aRegion);
   aTarget->PushClip(path);
 }
 
 /*static*/ void
 gfxUtils::ClipToRegion(gfxContext* aContext, const nsIntRegion& aRegion)
 {
-  ClipToRegionInternal(aContext, aRegion, false);
+  ClipToRegionInternal(aContext, aRegion);
 }
 
 /*static*/ void
 gfxUtils::ClipToRegion(DrawTarget* aTarget, const nsIntRegion& aRegion)
 {
   ClipToRegionInternal(aTarget, aRegion);
 }
 
-/*static*/ void
-gfxUtils::ClipToRegionSnapped(gfxContext* aContext, const nsIntRegion& aRegion)
-{
-  ClipToRegionInternal(aContext, aRegion, true);
-}
-
 /*static*/ gfxFloat
 gfxUtils::ClampToScaleFactor(gfxFloat aVal)
 {
   // Arbitary scale factor limitation. We can increase this
   // for better scaling performance at the cost of worse
   // quality.
   static const gfxFloat kScaleResolution = 2;
 
@@ -791,23 +783,17 @@ gfxUtils::ClampToScaleFactor(gfxFloat aV
 
   return scale;
 }
 
 
 /*static*/ void
 gfxUtils::PathFromRegion(gfxContext* aContext, const nsIntRegion& aRegion)
 {
-  PathFromRegionInternal(aContext, aRegion, false);
-}
-
-/*static*/ void
-gfxUtils::PathFromRegionSnapped(gfxContext* aContext, const nsIntRegion& aRegion)
-{
-  PathFromRegionInternal(aContext, aRegion, true);
+  PathFromRegionInternal(aContext, aRegion);
 }
 
 gfxMatrix
 gfxUtils::TransformRectToRect(const gfxRect& aFrom, const gfxPoint& aToTopLeft,
                               const gfxPoint& aToTopRight, const gfxPoint& aToBottomRight)
 {
   gfxMatrix m;
   if (aToTopRight.y == aToTopLeft.y && aToTopRight.x == aToBottomRight.x) {
--- a/gfx/thebes/gfxUtils.h
+++ b/gfx/thebes/gfxUtils.h
@@ -91,30 +91,20 @@ public:
     static void ClipToRegion(gfxContext* aContext, const nsIntRegion& aRegion);
 
     /**
      * Clip aTarget to the region aRegion.
      */
     static void ClipToRegion(mozilla::gfx::DrawTarget* aTarget, const nsIntRegion& aRegion);
 
     /**
-     * Clip aContext to the region aRegion, snapping the rectangles.
-     */
-    static void ClipToRegionSnapped(gfxContext* aContext, const nsIntRegion& aRegion);
-
-    /**
      * Create a path consisting of rectangles in |aRegion|.
      */
     static void PathFromRegion(gfxContext* aContext, const nsIntRegion& aRegion);
 
-    /**
-     * Create a path consisting of rectangles in |aRegion|, snapping the rectangles.
-     */
-    static void PathFromRegionSnapped(gfxContext* aContext, const nsIntRegion& aRegion);
-
     /*
      * Convert image format to depth value
      */
     static int ImageFormatToDepth(gfxImageFormat aFormat);
 
     /**
      * Return the transform matrix that maps aFrom to the rectangle defined by
      * aToTopLeft/aToTopRight/aToBottomRight. aFrom must be