Bug 852489. Part 7: Remove Layer::IntersectClipRect because it's no longer used and it's prone to cause unnecessary Mutateds. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 22 Mar 2013 15:17:29 +1300
changeset 126688 c226b01745609ffbfa065bf548df0cbdbf419529
parent 126687 643b78450848a17005742ce9e9bcf310a5a618ae
child 126689 ad75012bfabfb1b81c485d42cedf417ffe0b616b
push idunknown
push userunknown
push dateunknown
reviewersmattwoodrow
bugs852489
milestone22.0a1
Bug 852489. Part 7: Remove Layer::IntersectClipRect because it's no longer used and it's prone to cause unnecessary Mutateds. r=mattwoodrow
gfx/layers/Layers.h
--- a/gfx/layers/Layers.h
+++ b/gfx/layers/Layers.h
@@ -730,41 +730,16 @@ public:
         mClipRect = *aRect;
         Mutated();
       }
     }
   }
 
   /**
    * CONSTRUCTION PHASE ONLY
-   * Set a clip rect which will be applied to this layer as it is
-   * composited to the destination. The coordinates are relative to
-   * the parent layer (i.e. the contents of this layer
-   * are transformed before this clip rect is applied).
-   * For the root layer, the coordinates are relative to the widget,
-   * in device pixels.
-   * The provided rect is intersected with any existing clip rect.
-   */
-  void IntersectClipRect(const nsIntRect& aRect)
-  {
-    if (mUseClipRect) {
-      MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) IntersectClipRect was %d,%d,%d,%d intersecting with %d,%d,%d,%d", this,
-        mClipRect.x, mClipRect.y, mClipRect.width, mClipRect.height, aRect.x, aRect.y, aRect.width, aRect.height));
-      mClipRect.IntersectRect(mClipRect, aRect);
-    } else {
-      MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) IntersectClipRect was <none> intersecting with %d,%d,%d,%d", this,
-        aRect.x, aRect.y, aRect.width, aRect.height));
-      mUseClipRect = true;
-      mClipRect = aRect;
-    }
-    Mutated();
-  }
-
-  /**
-   * CONSTRUCTION PHASE ONLY
    * Set a layer to mask this layer.
    *
    * The mask layer should be applied using its effective transform (after it
    * is calculated by ComputeEffectiveTransformForMaskLayer), this should use
    * this layer's parent's transform and the mask layer's transform, but not
    * this layer's. That is, the mask layer is specified relative to this layer's
    * position in it's parent layer's coord space.
    * Currently, only 2D translations are supported for the mask layer transform.