Backed out changeset b15136f926ca (bug 1272778) for build bustage
authorWes Kocher <wkocher@mozilla.com>
Fri, 13 May 2016 16:05:12 -0700
changeset 336422 ce77d98823a4c7a2937f59f0b2ced23bff7eb339
parent 336421 b15136f926caef2db1d493dd63cc43ad8dde2336
child 336423 d4103c64c55cf21a023456ae1463d45da5db1483
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1272778
milestone49.0a1
backs outb15136f926caef2db1d493dd63cc43ad8dde2336
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
Backed out changeset b15136f926ca (bug 1272778) for build bustage
gfx/layers/Compositor.cpp
gfx/layers/Compositor.h
gfx/layers/basic/BasicCompositor.cpp
gfx/layers/basic/BasicCompositor.h
gfx/layers/composite/CanvasLayerComposite.cpp
gfx/layers/composite/ColorLayerComposite.cpp
gfx/layers/composite/CompositableHost.h
gfx/layers/composite/ContainerLayerComposite.cpp
gfx/layers/composite/ContentHost.cpp
gfx/layers/composite/ContentHost.h
gfx/layers/composite/FPSCounter.cpp
gfx/layers/composite/ImageHost.cpp
gfx/layers/composite/ImageHost.h
gfx/layers/composite/ImageLayerComposite.cpp
gfx/layers/composite/LayerManagerComposite.cpp
gfx/layers/composite/LayerManagerComposite.h
gfx/layers/composite/PaintedLayerComposite.cpp
gfx/layers/composite/TextRenderer.cpp
gfx/layers/composite/TiledContentHost.cpp
gfx/layers/composite/TiledContentHost.h
gfx/layers/d3d11/CompositorD3D11.cpp
gfx/layers/d3d11/CompositorD3D11.h
gfx/layers/d3d9/CompositorD3D9.cpp
gfx/layers/d3d9/CompositorD3D9.h
gfx/layers/ipc/CompositorBench.cpp
gfx/layers/ipc/CompositorBench.h
gfx/layers/opengl/CompositorOGL.cpp
gfx/layers/opengl/CompositorOGL.h
gfx/layers/opengl/CompositorOGLVR.cpp
--- a/gfx/layers/Compositor.cpp
+++ b/gfx/layers/Compositor.cpp
@@ -44,17 +44,17 @@ Compositor::ShouldDrawDiagnostics(Diagno
     return false;
   }
   return true;
 }
 
 void
 Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
                             const nsIntRegion& aVisibleRegion,
-                            const gfx::IntRect& aClipRect,
+                            const gfx::Rect& aClipRect,
                             const gfx::Matrix4x4& aTransform,
                             uint32_t aFlashCounter)
 {
   if (!ShouldDrawDiagnostics(aFlags)) {
     return;
   }
 
   if (aVisibleRegion.GetNumRects() > 1) {
@@ -67,32 +67,32 @@ Compositor::DrawDiagnostics(DiagnosticFl
 
   DrawDiagnostics(aFlags, IntRectToRect(aVisibleRegion.GetBounds()),
                   aClipRect, aTransform, aFlashCounter);
 }
 
 void
 Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
                             const gfx::Rect& aVisibleRect,
-                            const gfx::IntRect& aClipRect,
+                            const gfx::Rect& aClipRect,
                             const gfx::Matrix4x4& aTransform,
                             uint32_t aFlashCounter)
 {
   if (!ShouldDrawDiagnostics(aFlags)) {
     return;
   }
 
   DrawDiagnosticsInternal(aFlags, aVisibleRect, aClipRect, aTransform,
                           aFlashCounter);
 }
 
 void
 Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags,
                                     const gfx::Rect& aVisibleRect,
-                                    const gfx::IntRect& aClipRect,
+                                    const gfx::Rect& aClipRect,
                                     const gfx::Matrix4x4& aTransform,
                                     uint32_t aFlashCounter)
 {
 #ifdef MOZ_B2G
   int lWidth = 4;
 #elif defined(ANDROID)
   int lWidth = 10;
 #else
@@ -140,17 +140,17 @@ Compositor::DrawDiagnosticsInternal(Diag
     color.b *= flash;
   }
 
   SlowDrawRect(aVisibleRect, color, aClipRect, aTransform, lWidth);
 }
 
 void
 Compositor::SlowDrawRect(const gfx::Rect& aRect, const gfx::Color& aColor,
-                     const gfx::IntRect& aClipRect,
+                     const gfx::Rect& aClipRect,
                      const gfx::Matrix4x4& aTransform, int aStrokeWidth)
 {
   // TODO This should draw a rect using a single draw call but since
   // this is only used for debugging overlays it's not worth optimizing ATM.
   float opacity = 1.0f;
   EffectChain effects;
 
   effects.mPrimaryEffect = new EffectSolidColor(aColor);
@@ -173,17 +173,17 @@ Compositor::SlowDrawRect(const gfx::Rect
   this->DrawQuad(gfx::Rect(aRect.x + aStrokeWidth, aRect.y + aRect.height - aStrokeWidth,
                            aRect.width - 2 * aStrokeWidth, aStrokeWidth),
                  aClipRect, effects, opacity,
                  aTransform);
 }
 
 void
 Compositor::FillRect(const gfx::Rect& aRect, const gfx::Color& aColor,
-                     const gfx::IntRect& aClipRect,
+                     const gfx::Rect& aClipRect,
                      const gfx::Matrix4x4& aTransform)
 {
   float opacity = 1.0f;
   EffectChain effects;
 
   effects.mPrimaryEffect = new EffectSolidColor(aColor);
   this->DrawQuad(aRect,
                  aClipRect, effects, opacity,
@@ -351,26 +351,26 @@ DecomposeIntoNoRepeatRects(const gfx::Re
            xmid, ymid, aRect.XMost(), aRect.YMost(),
            0.0f, 0.0f, br.x, br.y,
            flipped);
   return 4;
 }
 
 gfx::IntRect
 Compositor::ComputeBackdropCopyRect(const gfx::Rect& aRect,
-                                    const gfx::IntRect& aClipRect,
+                                    const gfx::Rect& aClipRect,
                                     const gfx::Matrix4x4& aTransform,
                                     gfx::Matrix4x4* aOutTransform,
                                     gfx::Rect* aOutLayerQuad)
 {
   // Compute the clip.
   gfx::IntPoint rtOffset = GetCurrentRenderTarget()->GetOrigin();
   gfx::IntSize rtSize = GetCurrentRenderTarget()->GetSize();
 
-  gfx::IntRect renderBounds(0, 0, rtSize.width, rtSize.height);
+  gfx::Rect renderBounds(0, 0, rtSize.width, rtSize.height);
   renderBounds.IntersectRect(renderBounds, aClipRect);
   renderBounds.MoveBy(rtOffset);
 
   // Apply the layer transform.
   gfx::RectDouble dest = aTransform.TransformAndClipBounds(
     gfx::RectDouble(aRect.x, aRect.y, aRect.width, aRect.height),
     gfx::RectDouble(renderBounds.x, renderBounds.y, renderBounds.width, renderBounds.height));
   dest -= rtOffset;
--- a/gfx/layers/Compositor.h
+++ b/gfx/layers/Compositor.h
@@ -314,45 +314,45 @@ public:
   /**
    * Tell the compositor to draw a quad. What to do draw and how it is
    * drawn is specified by aEffectChain. aRect is the quad to draw, in user space.
    * aTransform transforms from user space to screen space. If texture coords are
    * required, these will be in the primary effect in the effect chain.
    * aVisibleRect is used to determine which edges should be antialiased,
    * without applying the effect to the inner edges of a tiled layer.
    */
-  virtual void DrawQuad(const gfx::Rect& aRect, const gfx::IntRect& aClipRect,
+  virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
                         const EffectChain& aEffectChain,
                         gfx::Float aOpacity, const gfx::Matrix4x4& aTransform,
                         const gfx::Rect& aVisibleRect) = 0;
 
   /**
    * Overload of DrawQuad, with aVisibleRect defaulted to the value of aRect.
    * Use this when you are drawing a single quad that is not part of a tiled
    * layer.
    */
-  void DrawQuad(const gfx::Rect& aRect, const gfx::IntRect& aClipRect,
+  void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
                         const EffectChain& aEffectChain,
                         gfx::Float aOpacity, const gfx::Matrix4x4& aTransform) {
       DrawQuad(aRect, aClipRect, aEffectChain, aOpacity, aTransform, aRect);
   }
 
   /**
    * Draw an unfilled solid color rect. Typically used for debugging overlays.
    */
   void SlowDrawRect(const gfx::Rect& aRect, const gfx::Color& color,
-                const gfx::IntRect& aClipRect = gfx::IntRect(),
+                const gfx::Rect& aClipRect = gfx::Rect(),
                 const gfx::Matrix4x4& aTransform = gfx::Matrix4x4(),
                 int aStrokeWidth = 1);
 
   /**
    * Draw a solid color filled rect. This is a simple DrawQuad helper.
    */
   void FillRect(const gfx::Rect& aRect, const gfx::Color& color,
-                    const gfx::IntRect& aClipRect = gfx::IntRect(),
+                    const gfx::Rect& aClipRect = gfx::Rect(),
                     const gfx::Matrix4x4& aTransform = gfx::Matrix4x4());
 
   /*
    * Clear aRect on current render target.
    */
   virtual void ClearRect(const gfx::Rect& aRect) = 0;
 
   /**
@@ -373,21 +373,21 @@ public:
    * If aRenderBoundsOut is non-null, it will be set to the render bounds
    * actually used by the compositor in window space. If aRenderBoundsOut
    * is returned empty, composition should be aborted.
    *
    * If aOpaque is true, then all of aInvalidRegion will be drawn to with
    * opaque content.
    */
   virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
-                          const gfx::IntRect* aClipRectIn,
-                          const gfx::IntRect& aRenderBounds,
+                          const gfx::Rect* aClipRectIn,
+                          const gfx::Rect& aRenderBounds,
                           const nsIntRegion& aOpaqueRegion,
-                          gfx::IntRect* aClipRectOut = nullptr,
-                          gfx::IntRect* aRenderBoundsOut = nullptr) = 0;
+                          gfx::Rect* aClipRectOut = nullptr,
+                          gfx::Rect* aRenderBoundsOut = nullptr) = 0;
 
   /**
    * Flush the current frame to the screen and tidy up.
    */
   virtual void EndFrame() = 0;
 
   virtual void SetDispAcquireFence(Layer* aLayer);
 
@@ -412,23 +412,23 @@ public:
 
   DiagnosticTypes GetDiagnosticTypes() const
   {
     return mDiagnosticTypes;
   }
 
   void DrawDiagnostics(DiagnosticFlags aFlags,
                        const gfx::Rect& visibleRect,
-                       const gfx::IntRect& aClipRect,
+                       const gfx::Rect& aClipRect,
                        const gfx::Matrix4x4& transform,
                        uint32_t aFlashCounter = DIAGNOSTIC_FLASH_COUNTER_MAX);
 
   void DrawDiagnostics(DiagnosticFlags aFlags,
                        const nsIntRegion& visibleRegion,
-                       const gfx::IntRect& aClipRect,
+                       const gfx::Rect& aClipRect,
                        const gfx::Matrix4x4& transform,
                        uint32_t aFlashCounter = DIAGNOSTIC_FLASH_COUNTER_MAX);
 
 #ifdef MOZ_DUMP_PAINTING
   virtual const char* Name() const = 0;
 #endif // MOZ_DUMP_PAINTING
 
   virtual LayersBackend GetBackendType() const = 0;
@@ -535,33 +535,33 @@ public:
   bool IsValid() const;
   CompositorBridgeParent* GetCompositorBridgeParent() const {
     return mParent;
   }
 
 protected:
   void DrawDiagnosticsInternal(DiagnosticFlags aFlags,
                                const gfx::Rect& aVisibleRect,
-                               const gfx::IntRect& aClipRect,
+                               const gfx::Rect& aClipRect,
                                const gfx::Matrix4x4& transform,
                                uint32_t aFlashCounter);
 
   bool ShouldDrawDiagnostics(DiagnosticFlags);
 
   /**
    * Given a layer rect, clip, and transform, compute the area of the backdrop that
    * needs to be copied for mix-blending. The output transform translates from 0..1
    * space into the backdrop rect space.
    *
    * The transformed layer quad is also optionally returned - this is the same as
    * the result rect, before rounding.
    */
   gfx::IntRect ComputeBackdropCopyRect(
     const gfx::Rect& aRect,
-    const gfx::IntRect& aClipRect,
+    const gfx::Rect& aClipRect,
     const gfx::Matrix4x4& aTransform,
     gfx::Matrix4x4* aOutTransform,
     gfx::Rect* aOutLayerQuad = nullptr);
 
   /**
    * Render time for the current composition.
    */
   TimeStamp mCompositionTime;
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -272,17 +272,17 @@ SetupMask(const EffectChain& aEffectChai
     MOZ_ASSERT(effectMask->mMaskTransform.Is2D(), "How did we end up with a 3D transform here?!");
     aMaskTransform = effectMask->mMaskTransform.As2D();
     aMaskTransform.PostTranslate(-aOffset.x, -aOffset.y);
   }
 }
 
 void
 BasicCompositor::DrawQuad(const gfx::Rect& aRect,
-                          const gfx::IntRect& aClipRect,
+                          const gfx::Rect& aClipRect,
                           const EffectChain &aEffectChain,
                           gfx::Float aOpacity,
                           const gfx::Matrix4x4& aTransform,
                           const gfx::Rect& aVisibleRect)
 {
   RefPtr<DrawTarget> buffer = mRenderTarget->mDrawTarget;
 
   // For 2D drawing, |dest| and |buffer| are the same surface. For 3D drawing,
@@ -318,17 +318,17 @@ BasicCompositor::DrawQuad(const gfx::Rec
     newTransform = Matrix();
 
     // When we apply the 3D transformation, we do it against a temporary
     // surface, so undo the coordinate offset.
     new3DTransform = aTransform;
     new3DTransform.PreTranslate(aRect.x, aRect.y, 0);
   }
 
-  buffer->PushClipRect(Rect(aClipRect));
+  buffer->PushClipRect(aClipRect);
 
   newTransform.PostTranslate(-offset.x, -offset.y);
   buffer->SetTransform(newTransform);
 
   RefPtr<SourceSurface> sourceMask;
   Matrix maskTransform;
   if (aTransform.Is2D()) {
     SetupMask(aEffectChain, dest, offset, sourceMask, maskTransform);
@@ -470,24 +470,24 @@ BasicCompositor::DrawQuad(const gfx::Rec
 void
 BasicCompositor::ClearRect(const gfx::Rect& aRect)
 {
   mRenderTarget->mDrawTarget->ClearRect(aRect);
 }
 
 void
 BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
-                            const gfx::IntRect *aClipRectIn,
-                            const gfx::IntRect& aRenderBounds,
+                            const gfx::Rect *aClipRectIn,
+                            const gfx::Rect& aRenderBounds,
                             const nsIntRegion& aOpaqueRegion,
-                            gfx::IntRect *aClipRectOut /* = nullptr */,
-                            gfx::IntRect *aRenderBoundsOut /* = nullptr */)
+                            gfx::Rect *aClipRectOut /* = nullptr */,
+                            gfx::Rect *aRenderBoundsOut /* = nullptr */)
 {
   LayoutDeviceIntRect intRect(LayoutDeviceIntPoint(), mWidget->GetClientSize());
-  IntRect rect = IntRect(0, 0, intRect.width, intRect.height);
+  Rect rect = Rect(0, 0, intRect.width, intRect.height);
 
   LayoutDeviceIntRegion invalidRegionSafe;
   if (mDidExternalComposition) {
     // We do not know rendered region during external composition, just redraw
     // whole widget.
     invalidRegionSafe = intRect;
     mDidExternalComposition = false;
   } else {
@@ -495,17 +495,17 @@ BasicCompositor::BeginFrame(const nsIntR
     invalidRegionSafe.And(
       LayoutDeviceIntRegion::FromUnknownRegion(aInvalidRegion), intRect);
   }
 
   mInvalidRegion = invalidRegionSafe;
   mInvalidRect = mInvalidRegion.GetBounds();
 
   if (aRenderBoundsOut) {
-    *aRenderBoundsOut = IntRect();
+    *aRenderBoundsOut = Rect();
   }
 
   BufferMode bufferMode = BufferMode::BUFFERED;
   if (mTarget) {
     // If we have a copy target, then we don't have a widget-provided mDrawTarget (currently). Use a dummy
     // placeholder so that CreateRenderTarget() works.
     mDrawTarget = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
   } else {
@@ -555,19 +555,19 @@ BasicCompositor::BeginFrame(const nsIntR
   gfxUtils::ClipToRegion(mRenderTarget->mDrawTarget,
                          mInvalidRegion.ToUnknownRegion());
 
   if (aRenderBoundsOut) {
     *aRenderBoundsOut = rect;
   }
 
   if (aClipRectIn) {
-    mRenderTarget->mDrawTarget->PushClipRect(Rect(*aClipRectIn));
+    mRenderTarget->mDrawTarget->PushClipRect(*aClipRectIn);
   } else {
-    mRenderTarget->mDrawTarget->PushClipRect(Rect(rect));
+    mRenderTarget->mDrawTarget->PushClipRect(rect);
     if (aClipRectOut) {
       *aClipRectOut = rect;
     }
   }
 }
 
 void
 BasicCompositor::EndFrame()
--- a/gfx/layers/basic/BasicCompositor.h
+++ b/gfx/layers/basic/BasicCompositor.h
@@ -86,30 +86,30 @@ public:
     mRenderTarget->BindRenderTarget();
   }
   virtual CompositingRenderTarget* GetCurrentRenderTarget() const override
   {
     return mRenderTarget;
   }
 
   virtual void DrawQuad(const gfx::Rect& aRect,
-                        const gfx::IntRect& aClipRect,
+                        const gfx::Rect& aClipRect,
                         const EffectChain &aEffectChain,
                         gfx::Float aOpacity,
                         const gfx::Matrix4x4& aTransform,
                         const gfx::Rect& aVisibleRect) override;
 
   virtual void ClearRect(const gfx::Rect& aRect) override;
 
   virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
-                          const gfx::IntRect *aClipRectIn,
-                          const gfx::IntRect& aRenderBounds,
+                          const gfx::Rect *aClipRectIn,
+                          const gfx::Rect& aRenderBounds,
                           const nsIntRegion& aOpaqueRegion,
-                          gfx::IntRect *aClipRectOut = nullptr,
-                          gfx::IntRect *aRenderBoundsOut = nullptr) override;
+                          gfx::Rect *aClipRectOut = nullptr,
+                          gfx::Rect *aRenderBoundsOut = nullptr) override;
   virtual void EndFrame() override;
   virtual void EndFrameForExternalComposition(const gfx::Matrix& aTransform) override;
 
   virtual bool SupportsPartialTextureUpdate() override { return true; }
   virtual bool CanUseCanvasLayerForSize(const gfx::IntSize &aSize) override { return true; }
   virtual int32_t GetMaxTextureSize() const override;
   virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) override { }
   
--- a/gfx/layers/composite/CanvasLayerComposite.cpp
+++ b/gfx/layers/composite/CanvasLayerComposite.cpp
@@ -90,17 +90,17 @@ CanvasLayerComposite::RenderLayer(const 
 #ifdef MOZ_DUMP_PAINTING
   if (gfxEnv::DumpCompositorTextures()) {
     RefPtr<gfx::DataSourceSurface> surf = mCompositableHost->GetAsSurface();
     WriteSnapshotToDumpFile(this, surf);
   }
 #endif
 
   RenderWithAllMasks(this, mCompositor, aClipRect,
-                     [&](EffectChain& effectChain, const IntRect& clipRect) {
+                     [&](EffectChain& effectChain, const Rect& clipRect) {
     mCompositableHost->Composite(this, effectChain,
                           GetEffectiveOpacity(),
                           GetEffectiveTransform(),
                           GetEffectFilter(),
                           clipRect);
   });
 
   mCompositableHost->BumpFlashCounter();
--- a/gfx/layers/composite/ColorLayerComposite.cpp
+++ b/gfx/layers/composite/ColorLayerComposite.cpp
@@ -21,23 +21,23 @@ using namespace mozilla::gfx;
 
 void
 ColorLayerComposite::RenderLayer(const IntRect& aClipRect)
 {
   Rect rect(GetBounds());
   const Matrix4x4& transform = GetEffectiveTransform();
 
   RenderWithAllMasks(this, mCompositor, aClipRect,
-                     [&](EffectChain& effectChain, const IntRect& clipRect) {
+                     [&](EffectChain& effectChain, const Rect& clipRect) {
     GenEffectChain(effectChain);
     mCompositor->DrawQuad(rect, clipRect, effectChain, GetEffectiveOpacity(),
                           transform);
   });
 
-  mCompositor->DrawDiagnostics(DiagnosticFlags::COLOR, rect, aClipRect,
+  mCompositor->DrawDiagnostics(DiagnosticFlags::COLOR, rect, Rect(aClipRect),
                                transform);
 }
 
 void
 ColorLayerComposite::GenEffectChain(EffectChain& aEffect)
 {
   aEffect.mLayerRef = this;
   aEffect.mPrimaryEffect = new EffectSolidColor(GetColor());
--- a/gfx/layers/composite/CompositableHost.h
+++ b/gfx/layers/composite/CompositableHost.h
@@ -77,17 +77,17 @@ public:
   virtual void SetCompositor(Compositor* aCompositor);
 
   // composite the contents of this buffer host to the compositor's surface
   virtual void Composite(LayerComposite* aLayer,
                          EffectChain& aEffectChain,
                          float aOpacity,
                          const gfx::Matrix4x4& aTransform,
                          const gfx::Filter& aFilter,
-                         const gfx::IntRect& aClipRect,
+                         const gfx::Rect& aClipRect,
                          const nsIntRegion* aVisibleRegion = nullptr) = 0;
 
   /**
    * Update the content host.
    * aUpdated is the region which should be updated
    * aUpdatedRegionBack is the region in aNewBackResult which has been updated
    */
   virtual bool UpdateThebes(const ThebesBufferData& aData,
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -317,27 +317,27 @@ ContainerRenderVR(ContainerT* aContainer
   if (vrRendering) {
     vrRendering->SubmitFrame(aContainer->mVRRenderTargetSet, inputFrameID);
     DUMP("<<< ContainerRenderVR [used vrRendering] [%p]\n", aContainer);
     if (!gfxPrefs::VRMirrorTextures()) {
       return;
     }
   }
 
-  gfx::IntRect rect(surfaceRect.x, surfaceRect.y, surfaceRect.width, surfaceRect.height);
-  gfx::IntRect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
+  gfx::Rect rect(surfaceRect.x, surfaceRect.y, surfaceRect.width, surfaceRect.height);
+  gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
 
   // The VR geometry may not cover the entire area; we need to fill with a solid color
   // first.
   // XXX should DrawQuad handle this on its own?  Is there a time where we wouldn't want
   // to do this? (e.g. something like Cardboard would not require distortion so will fill
   // the entire rect)
   EffectChain solidEffect(aContainer);
   solidEffect.mPrimaryEffect = new EffectSolidColor(Color(0.0, 0.0, 0.0, 1.0));
-  aManager->GetCompositor()->DrawQuad(Rect(rect), rect, solidEffect, 1.0, gfx::Matrix4x4());
+  aManager->GetCompositor()->DrawQuad(rect, rect, solidEffect, 1.0, gfx::Matrix4x4());
 
   // draw the temporary surface with VR distortion to the original destination
   EffectChain vrEffect(aContainer);
   bool skipDistortion = vrRendering || gfxEnv::VRNoDistortion();
   if (skipDistortion) {
     vrEffect.mPrimaryEffect = new EffectRenderTarget(surface);
   } else {
     vrEffect.mPrimaryEffect = new EffectVRDistortion(aHMD, surface);
@@ -346,17 +346,17 @@ ContainerRenderVR(ContainerT* aContainer
   gfx::Matrix4x4 scaleTransform = aContainer->GetEffectiveTransform();
   scaleTransform.PreScale(rtBounds.width / float(surfaceRect.width),
                           rtBounds.height / float(surfaceRect.height),
                           1.0f);
 
   // XXX we shouldn't use visibleRect here -- the VR distortion needs to know the
   // full rect, not just the visible one.  Luckily, right now, VR distortion is only
   // rendered when the element is fullscreen, so the visibleRect will be right anyway.
-  aManager->GetCompositor()->DrawQuad(Rect(rect), clipRect, vrEffect, opacity,
+  aManager->GetCompositor()->DrawQuad(rect, clipRect, vrEffect, opacity,
                                       scaleTransform);
 
   DUMP("<<< ContainerRenderVR [%p]\n", aContainer);
 }
 
 static bool
 NeedToDrawCheckerboardingForLayer(Layer* aLayer, Color* aOutCheckerboardingColor)
 {
@@ -554,17 +554,19 @@ RenderMinimap(ContainerT* aContainer, La
     return;
   }
 
   Matrix4x4 transform = Matrix4x4::Scaling(scaleFactor, scaleFactor, 1);
   transform.PostTranslate(horizontalPadding + dest.x, verticalPadding + dest.y, 0);
 
   Rect transformedScrollRect = transform.TransformBounds(scrollRect.ToUnknownRect());
 
-  IntRect clipRect = RoundedOut(aContainer->GetEffectiveTransform().TransformBounds(transformedScrollRect));
+  Rect clipRect = aContainer->GetEffectiveTransform().TransformBounds(transformedScrollRect);
+  clipRect.width++;
+  clipRect.height++;
 
   // Render the scrollable area.
   compositor->FillRect(transformedScrollRect, backgroundColor, clipRect, aContainer->GetEffectiveTransform());
   compositor->SlowDrawRect(transformedScrollRect, pageBorderColor, clipRect, aContainer->GetEffectiveTransform());
 
   // If enabled, render information about visibility.
   if (gfxPrefs::APZMinimapVisibilityEnabled()) {
     // Retrieve the APZC scrollable layer guid, which we'll use to get the
@@ -635,17 +637,17 @@ RenderLayers(ContainerT* aContainer,
       // for the painted layer whereas the checkerboard region does not. One does not simply
       // intersect areas in different coordinate spaces. So we do this a little more permissively
       // and only fill in the background when we know there is checkerboard, which in theory
       // should only occur transiently.
       gfx::IntRect layerBounds = layer->GetLayerBounds();
       EffectChain effectChain(layer);
       effectChain.mPrimaryEffect = new EffectSolidColor(color);
       aManager->GetCompositor()->DrawQuad(gfx::Rect(layerBounds.x, layerBounds.y, layerBounds.width, layerBounds.height),
-                                          clipRect.ToUnknownRect(),
+                                          gfx::Rect(clipRect.ToUnknownRect()),
                                           effectChain, layer->GetEffectiveOpacity(),
                                           layer->GetEffectiveTransform());
     }
 
     if (layerToRender->HasLayerBeenComposited()) {
       // Composer2D will compose this layer so skip GPU composition
       // this time. The flag will be reset for the next composition phase
       // at the beginning of LayerManagerComposite::Rener().
@@ -678,17 +680,17 @@ RenderLayers(ContainerT* aContainer,
     Matrix4x4 asyncTransform;
     for (uint32_t i = layer->GetScrollMetadataCount(); i > 0; --i) {
       if (layer->GetFrameMetrics(i - 1).IsScrollable()) {
         // Since the composition bounds are in the parent layer's coordinates,
         // use the parent's effective transform rather than the layer's own.
         ParentLayerRect compositionBounds = layer->GetFrameMetrics(i - 1).GetCompositionBounds();
         aManager->GetCompositor()->DrawDiagnostics(DiagnosticFlags::CONTAINER,
                                                    compositionBounds.ToUnknownRect(),
-                                                   aClipRect.ToUnknownRect(),
+                                                   gfx::Rect(aClipRect.ToUnknownRect()),
                                                    asyncTransform * aContainer->GetEffectiveTransform());
         if (AsyncPanZoomController* apzc = layer->GetAsyncPanZoomController(i - 1)) {
           asyncTransform =
               apzc->GetCurrentAsyncTransformWithOverscroll(AsyncPanZoomController::RESPECT_FORCE_DISABLE).ToUnknownMatrix()
             * asyncTransform;
         }
       }
     }
@@ -810,17 +812,17 @@ ContainerRender(ContainerT* aContainer,
       if (surf) {
         WriteSnapshotToDumpFile(aContainer, surf);
       }
     }
 #endif
 
     RefPtr<ContainerT> container = aContainer;
     RenderWithAllMasks(aContainer, compositor, aClipRect,
-                       [&, surface, compositor, container](EffectChain& effectChain, const IntRect& clipRect) {
+                       [&, surface, compositor, container](EffectChain& effectChain, const Rect& clipRect) {
       effectChain.mPrimaryEffect = new EffectRenderTarget(surface);
       compositor->DrawQuad(visibleRect, clipRect, effectChain,
                            container->GetEffectiveOpacity(),
                            container->GetEffectiveTransform());
     });
   } else {
     RenderLayers(aContainer, aManager, RenderTargetIntRect::FromUnknownRect(aClipRect));
   }
--- a/gfx/layers/composite/ContentHost.cpp
+++ b/gfx/layers/composite/ContentHost.cpp
@@ -32,17 +32,17 @@ ContentHostBase::~ContentHostBase()
 }
 
 void
 ContentHostTexture::Composite(LayerComposite* aLayer,
                               EffectChain& aEffectChain,
                               float aOpacity,
                               const gfx::Matrix4x4& aTransform,
                               const Filter& aFilter,
-                              const IntRect& aClipRect,
+                              const Rect& aClipRect,
                               const nsIntRegion* aVisibleRegion)
 {
   NS_ASSERTION(aVisibleRegion, "Requires a visible region");
 
   AutoLockCompositableHost lock(this);
   if (lock.Failed()) {
     return;
   }
--- a/gfx/layers/composite/ContentHost.h
+++ b/gfx/layers/composite/ContentHost.h
@@ -117,17 +117,17 @@ public:
     , mReceivedNewHost(false)
   { }
 
   virtual void Composite(LayerComposite* aLayer,
                          EffectChain& aEffectChain,
                          float aOpacity,
                          const gfx::Matrix4x4& aTransform,
                          const gfx::Filter& aFilter,
-                         const gfx::IntRect& aClipRect,
+                         const gfx::Rect& aClipRect,
                          const nsIntRegion* aVisibleRegion = nullptr) override;
 
   virtual void SetCompositor(Compositor* aCompositor) override;
 
   virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override;
 
   virtual void Dump(std::stringstream& aStream,
                     const char* aPrefix="",
--- a/gfx/layers/composite/FPSCounter.cpp
+++ b/gfx/layers/composite/FPSCounter.cpp
@@ -388,17 +388,17 @@ static void DrawDigits(unsigned int aVal
   for (size_t n = 0; n < 3; ++n) {
     unsigned int digit = aValue % (divisor * 10) / divisor;
     divisor /= 10;
 
     RefPtr<TexturedEffect> texturedEffect = static_cast<TexturedEffect*>(aEffectChain.mPrimaryEffect.get());
     texturedEffect->mTextureCoords = Rect(float(digit * FontWidth) / textureWidth, 0, FontWidth / textureWidth, 1.0f);
 
     Rect drawRect = Rect(aOffsetX + n * FontWidth, aOffsetY, FontWidth, FontHeight);
-    IntRect clipRect = IntRect(0, 0, 300, 100);
+    Rect clipRect = Rect(0, 0, 300, 100);
     aCompositor->DrawQuad(drawRect, clipRect,
   aEffectChain, opacity, transform);
   }
 }
 
 void FPSState::DrawFPS(TimeStamp aNow,
                        int aOffsetX, int aOffsetY,
                        unsigned int aFillRatio,
--- a/gfx/layers/composite/ImageHost.cpp
+++ b/gfx/layers/composite/ImageHost.cpp
@@ -291,17 +291,17 @@ void ImageHost::Attach(Layer* aLayer,
 }
 
 void
 ImageHost::Composite(LayerComposite* aLayer,
                      EffectChain& aEffectChain,
                      float aOpacity,
                      const gfx::Matrix4x4& aTransform,
                      const gfx::Filter& aFilter,
-                     const gfx::IntRect& aClipRect,
+                     const gfx::Rect& aClipRect,
                      const nsIntRegion* aVisibleRegion)
 {
   if (!GetCompositor()) {
     // should only happen when a tab is dragged to another window and
     // async-video is still sending frames but we haven't attached the
     // set the new compositor yet.
     return;
   }
@@ -678,17 +678,17 @@ ImageHostOverlay::SetCompositor(Composit
 void
 ImageHostOverlay::Composite(Compositor* aCompositor,
                             uint32_t aFlashCounter,
                             LayerComposite* aLayer,
                             EffectChain& aEffectChain,
                             float aOpacity,
                             const gfx::Matrix4x4& aTransform,
                             const gfx::Filter& aFilter,
-                            const gfx::IntRect& aClipRect,
+                            const gfx::Rect& aClipRect,
                             const nsIntRegion* aVisibleRegion)
 {
   MOZ_ASSERT(mCompositor == aCompositor);
 
   if (mOverlay.handle().type() == OverlayHandle::Tnull_t) {
     return;
   }
 
--- a/gfx/layers/composite/ImageHost.h
+++ b/gfx/layers/composite/ImageHost.h
@@ -43,17 +43,17 @@ public:
 
   virtual CompositableType GetType() override { return mTextureInfo.mCompositableType; }
 
   virtual void Composite(LayerComposite* aLayer,
                          EffectChain& aEffectChain,
                          float aOpacity,
                          const gfx::Matrix4x4& aTransform,
                          const gfx::Filter& aFilter,
-                         const gfx::IntRect& aClipRect,
+                         const gfx::Rect& aClipRect,
                          const nsIntRegion* aVisibleRegion = nullptr) override;
 
   virtual void UseTextureHost(const nsTArray<TimedTexture>& aTextures) override;
 
   virtual void RemoveTextureHost(TextureHost* aTexture) override;
 
   virtual void UseOverlaySource(OverlaySource aOverlay,
                                 const gfx::IntRect& aPictureRect) override;
@@ -177,17 +177,17 @@ public:
 
   virtual void Composite(Compositor* aCompositor,
                          uint32_t aFlashCounter,
                          LayerComposite* aLayer,
                          EffectChain& aEffectChain,
                          float aOpacity,
                          const gfx::Matrix4x4& aTransform,
                          const gfx::Filter& aFilter,
-                         const gfx::IntRect& aClipRect,
+                         const gfx::Rect& aClipRect,
                          const nsIntRegion* aVisibleRegion);
   virtual LayerRenderState GetRenderState();
   virtual void UseOverlaySource(OverlaySource aOverlay,
                                 const gfx::IntRect& aPictureRect);
   virtual gfx::IntSize GetImageSize() const;
   virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
 protected:
   RefPtr<Compositor> mCompositor;
--- a/gfx/layers/composite/ImageLayerComposite.cpp
+++ b/gfx/layers/composite/ImageLayerComposite.cpp
@@ -101,17 +101,17 @@ ImageLayerComposite::RenderLayer(const I
     RefPtr<gfx::DataSourceSurface> surf = mImageHost->GetAsSurface();
     WriteSnapshotToDumpFile(this, surf);
   }
 #endif
 
   mCompositor->MakeCurrent();
 
   RenderWithAllMasks(this, mCompositor, aClipRect,
-                     [&](EffectChain& effectChain, const IntRect& clipRect) {
+                     [&](EffectChain& effectChain, const Rect& clipRect) {
     mImageHost->SetCompositor(mCompositor);
     mImageHost->Composite(this, effectChain,
                           GetEffectiveOpacity(),
                           GetEffectiveTransformForBuffer(),
                           GetEffectFilter(),
                           clipRect);
   });
   mImageHost->BumpFlashCounter();
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -565,17 +565,17 @@ LayerManagerComposite::InvalidateDebugOv
   }
   if (drawFrameColorBars) {
     aInvalidRegion.Or(aInvalidRegion, nsIntRect(0, 0, 10, aBounds.height));
   }
 }
 
 static uint16_t sFrameCount = 0;
 void
-LayerManagerComposite::RenderDebugOverlay(const IntRect& aBounds)
+LayerManagerComposite::RenderDebugOverlay(const Rect& aBounds)
 {
   bool drawFps = gfxPrefs::LayersDrawFPS();
   bool drawFrameCounter = gfxPrefs::DrawFrameCounter();
   bool drawFrameColorBars = gfxPrefs::CompositorDrawColorBars();
 
   TimeStamp now = TimeStamp::Now();
 
   if (drawFps) {
@@ -636,38 +636,38 @@ LayerManagerComposite::RenderDebugOverla
     }
 
     // Each frame is invalidate by the previous frame for simplicity
   } else {
     mFPS = nullptr;
   }
 
   if (drawFrameColorBars) {
-    gfx::IntRect sideRect(0, 0, 10, aBounds.height);
+    gfx::Rect sideRect(0, 0, 10, aBounds.height);
 
     EffectChain effects;
     effects.mPrimaryEffect = new EffectSolidColor(gfxUtils::GetColorForFrameNumber(sFrameCount));
-    mCompositor->DrawQuad(Rect(sideRect),
+    mCompositor->DrawQuad(sideRect,
                           sideRect,
                           effects,
                           1.0,
                           gfx::Matrix4x4());
 
   }
 
 #ifdef MOZ_PROFILING
   if (drawFrameCounter) {
     profiler_set_frame_number(sFrameCount);
     const char* qr = sQRCodeTable[sFrameCount%256];
 
     int size = 21;
     int padding = 2;
     float opacity = 1.0;
     const uint16_t bitWidth = 5;
-    gfx::IntRect clip(0,0, bitWidth*640, bitWidth*640);
+    gfx::Rect clip(0,0, bitWidth*640, bitWidth*640);
 
     // Draw the white squares at once
     gfx::Color bitColor(1.0, 1.0, 1.0, 1.0);
     EffectChain effects;
     effects.mPrimaryEffect = new EffectSolidColor(bitColor);
     int totalSize = (size + padding * 2) * bitWidth;
     mCompositor->DrawQuad(gfx::Rect(0, 0, totalSize, totalSize),
                           clip,
@@ -781,17 +781,18 @@ LayerManagerComposite::PopGroupForLayerE
                                 0,   0,   0, 1,
                               -hc, -hc, -hc, 0);
     effectMatrix = effectMatrix * contrastMatrix;
   }
 
   effectChain.mPrimaryEffect = new EffectRenderTarget(mTwoPassTmpTarget);
   effectChain.mSecondaryEffects[EffectTypes::COLOR_MATRIX] = new EffectColorMatrix(effectMatrix);
 
-  mCompositor->DrawQuad(Rect(Point(0, 0), Size(mTwoPassTmpTarget->GetSize())), aClipRect, effectChain, 1.,
+  gfx::Rect clipRectF(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
+  mCompositor->DrawQuad(Rect(Point(0, 0), Size(mTwoPassTmpTarget->GetSize())), clipRectF, effectChain, 1.,
                         Matrix4x4());
 }
 
 // Used to clear the 'mLayerComposited' flag at the beginning of each Render().
 static void
 ClearLayerFlags(Layer* aLayer) {
   ForEachNode<ForwardIterator>(
       aLayer,
@@ -879,40 +880,40 @@ LayerManagerComposite::Render(const nsIn
       js::ProfileEntry::Category::GRAPHICS);
 
     if (!mCompositor->GetWidget()->PreRender(this)) {
       return;
     }
   }
 
   ParentLayerIntRect clipRect;
-  IntRect bounds(mRenderBounds.x, mRenderBounds.y, mRenderBounds.width, mRenderBounds.height);
-  IntRect actualBounds;
+  Rect bounds(mRenderBounds.x, mRenderBounds.y, mRenderBounds.width, mRenderBounds.height);
+  Rect actualBounds;
 
   CompositorBench(mCompositor, bounds);
 
   MOZ_ASSERT(mRoot->GetOpacity() == 1);
   if (mRoot->GetClipRect()) {
     clipRect = *mRoot->GetClipRect();
-    IntRect rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
+    Rect rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
     mCompositor->BeginFrame(aInvalidRegion, &rect, bounds, aOpaqueRegion, nullptr, &actualBounds);
   } else {
-    gfx::IntRect rect;
+    gfx::Rect rect;
     mCompositor->BeginFrame(aInvalidRegion, nullptr, bounds, aOpaqueRegion, &rect, &actualBounds);
     clipRect = ParentLayerIntRect(rect.x, rect.y, rect.width, rect.height);
   }
 
   if (actualBounds.IsEmpty()) {
     mCompositor->GetWidget()->PostRender(this);
     return;
   }
 
   // Allow widget to render a custom background.
   mCompositor->GetWidget()->DrawWindowUnderlay(
-    this, LayoutDeviceIntRect::FromUnknownRect(actualBounds));
+    this, LayoutDeviceIntRect::FromUnknownRect(TruncatedToInt(actualBounds)));
 
   RefPtr<CompositingRenderTarget> previousTarget;
   if (haveLayerEffects) {
     previousTarget = PushGroupForLayerEffects();
   } else {
     mTwoPassTmpTarget = nullptr;
   }
 
@@ -930,17 +931,17 @@ LayerManagerComposite::Render(const nsIn
   if (mTwoPassTmpTarget) {
     MOZ_ASSERT(haveLayerEffects);
     PopGroupForLayerEffects(previousTarget, clipRect.ToUnknownRect(),
                             grayscaleVal, invertVal, contrastVal);
   }
 
   // Allow widget to render a custom foreground.
   mCompositor->GetWidget()->DrawWindowOverlay(
-    this, LayoutDeviceIntRect::FromUnknownRect(actualBounds));
+    this, LayoutDeviceIntRect::FromUnknownRect(TruncatedToInt(actualBounds)));
 
   // Debugging
   RenderDebugOverlay(actualBounds);
 
   {
     PROFILER_LABEL("LayerManagerComposite", "EndFrame",
       js::ProfileEntry::Category::GRAPHICS);
 
@@ -1143,18 +1144,18 @@ LayerManagerComposite::RenderToPresentat
   Matrix4x4 matrix = Matrix4x4::From2D(viewMatrix);
 
   mRoot->ComputeEffectiveTransforms(matrix);
   nsIntRegion opaque;
   LayerIntRegion visible;
   PostProcessLayers(mRoot, opaque, visible, Nothing());
 
   nsIntRegion invalid;
-  IntRect bounds(0, 0, scale * pageWidth, actualHeight);
-  IntRect rect, actualBounds;
+  Rect bounds(0.0f, 0.0f, scale * pageWidth, (float)actualHeight);
+  Rect rect, actualBounds;
   MOZ_ASSERT(mRoot->GetOpacity() == 1);
   mCompositor->BeginFrame(invalid, nullptr, bounds, nsIntRegion(), &rect, &actualBounds);
 
   // The Java side of Fennec sets a scissor rect that accounts for
   // chrome such as the URL bar. Override that so that the entire frame buffer
   // is cleared.
   ScopedScissorRect scissorRect(egl, 0, 0, actualWidth, actualHeight);
   egl->fClearColor(0.0, 0.0, 0.0, 0.0);
--- a/gfx/layers/composite/LayerManagerComposite.h
+++ b/gfx/layers/composite/LayerManagerComposite.h
@@ -376,17 +376,17 @@ private:
   /**
    * We need to know our invalid region before we're ready to render.
    */
   void InvalidateDebugOverlay(nsIntRegion& aInvalidRegion, const gfx::IntRect& aBounds);
 
   /**
    * Render debug overlays such as the FPS/FrameCounter above the frame.
    */
-  void RenderDebugOverlay(const gfx::IntRect& aBounds);
+  void RenderDebugOverlay(const gfx::Rect& aBounds);
 
 
   RefPtr<CompositingRenderTarget> PushGroupForLayerEffects();
   void PopGroupForLayerEffects(RefPtr<CompositingRenderTarget> aPreviousTarget,
                                gfx::IntRect aClipRect,
                                bool aGrayscaleEffect,
                                bool aInvertEffect,
                                float aContrastEffect);
@@ -616,17 +616,17 @@ RenderWithAllMasks(Layer* aLayer, Compos
   }
 
   if (maskLayerCount <= 1) {
     // This is the common case. Render in one pass and return.
     EffectChain effectChain(aLayer);
     LayerManagerComposite::AutoAddMaskEffect
       autoMaskEffect(firstMask, effectChain);
     aLayer->AsLayerComposite()->AddBlendModeEffect(effectChain);
-    aRenderCallback(effectChain, aClipRect);
+    aRenderCallback(effectChain, gfx::Rect(aClipRect));
     return;
   }
 
   // We have multiple mask layers.
   // We split our list of mask layers into three parts:
   //  (1) The first mask
   //  (2) The list of intermediate masks (every mask except first and last)
   //  (3) The final mask.
@@ -654,23 +654,23 @@ RenderWithAllMasks(Layer* aLayer, Compos
   }
 
   // Render the source while applying the first mask.
   aCompositor->SetRenderTarget(firstTarget);
   {
     EffectChain firstEffectChain(aLayer);
     LayerManagerComposite::AutoAddMaskEffect
       firstMaskEffect(firstMask, firstEffectChain);
-    aRenderCallback(firstEffectChain, aClipRect - surfaceRect.TopLeft());
+    aRenderCallback(firstEffectChain, gfx::Rect(aClipRect - surfaceRect.TopLeft()));
     // firstTarget now contains the transformed source with the first mask and
     // opacity already applied.
   }
 
   // Apply the intermediate masks.
-  gfx::IntRect intermediateClip(surfaceRect - surfaceRect.TopLeft());
+  gfx::Rect intermediateClip(surfaceRect - surfaceRect.TopLeft());
   RefPtr<CompositingRenderTarget> previousTarget = firstTarget;
   for (size_t i = nextAncestorMaskLayer; i < ancestorMaskLayerCount - 1; i++) {
     Layer* intermediateMask = aLayer->GetAncestorMaskLayerAt(i);
     RefPtr<CompositingRenderTarget> intermediateTarget =
       aCompositor->CreateRenderTarget(surfaceRect, INIT_MODE_CLEAR);
     if (!intermediateTarget) {
       break;
     }
@@ -694,17 +694,17 @@ RenderWithAllMasks(Layer* aLayer, Compos
   finalEffectChain.mPrimaryEffect = new EffectRenderTarget(previousTarget);
   Layer* finalMask = aLayer->GetAncestorMaskLayerAt(ancestorMaskLayerCount - 1);
 
   // The blend mode needs to be applied in this final step, because this is
   // where we're blending with the actual background (which is in originalTarget).
   aLayer->AsLayerComposite()->AddBlendModeEffect(finalEffectChain);
   LayerManagerComposite::AutoAddMaskEffect autoMaskEffect(finalMask, finalEffectChain);
   if (!autoMaskEffect.Failed()) {
-    aCompositor->DrawQuad(gfx::Rect(surfaceRect), aClipRect,
+    aCompositor->DrawQuad(gfx::Rect(surfaceRect), gfx::Rect(aClipRect),
                           finalEffectChain, 1.0, gfx::Matrix4x4());
   }
 }
 
 } // namespace layers
 } // namespace mozilla
 
 #endif /* GFX_LayerManagerComposite_H */
--- a/gfx/layers/composite/PaintedLayerComposite.cpp
+++ b/gfx/layers/composite/PaintedLayerComposite.cpp
@@ -120,17 +120,17 @@ PaintedLayerComposite::RenderLayer(const
     if (surf) {
       WriteSnapshotToDumpFile(this, surf);
     }
   }
 #endif
 
 
   RenderWithAllMasks(this, compositor, aClipRect,
-                     [&](EffectChain& effectChain, const gfx::IntRect& clipRect) {
+                     [&](EffectChain& effectChain, const gfx::Rect& clipRect) {
     mBuffer->SetPaintWillResample(MayResample());
 
     mBuffer->Composite(this, effectChain,
                        GetEffectiveOpacity(),
                        GetEffectiveTransform(),
                        GetEffectFilter(),
                        clipRect,
                        &visibleRegion);
--- a/gfx/layers/composite/TextRenderer.cpp
+++ b/gfx/layers/composite/TextRenderer.cpp
@@ -133,17 +133,17 @@ TextRenderer::RenderText(const string& a
 
   RefPtr<EffectRGB> effect = new EffectRGB(src, true, Filter::LINEAR);
   EffectChain chain;
   chain.mPrimaryEffect = effect;
 
   Matrix4x4 transform = aTransform;
   transform.PreScale(scaleFactor, scaleFactor, 1.0f);
   mCompositor->DrawQuad(Rect(aOrigin.x, aOrigin.y, maxWidth, numLines * 16),
-                        IntRect(-10000, -10000, 20000, 20000), chain, 1.0f, transform);
+                        Rect(-10000, -10000, 20000, 20000), chain, 1.0f, transform);
 }
 
 void
 TextRenderer::EnsureInitialized()
 {
   if (mGlyphBitmaps) {
     return;
   }
--- a/gfx/layers/composite/TiledContentHost.cpp
+++ b/gfx/layers/composite/TiledContentHost.cpp
@@ -459,17 +459,17 @@ TiledLayerBufferComposite::Clear()
 }
 
 void
 TiledContentHost::Composite(LayerComposite* aLayer,
                             EffectChain& aEffectChain,
                             float aOpacity,
                             const gfx::Matrix4x4& aTransform,
                             const gfx::Filter& aFilter,
-                            const gfx::IntRect& aClipRect,
+                            const gfx::Rect& aClipRect,
                             const nsIntRegion* aVisibleRegion /* = nullptr */)
 {
   MOZ_ASSERT(mCompositor);
   // Reduce the opacity of the low-precision buffer to make it a
   // little more subtle and less jarring. In particular, text
   // rendered at low-resolution and scaled tends to look pretty
   // heavy and this helps mitigate that. When we reduce the opacity
   // we also make sure to draw the background color behind the
@@ -519,17 +519,17 @@ TiledContentHost::Composite(LayerComposi
 
 
 void
 TiledContentHost::RenderTile(TileHost& aTile,
                              EffectChain& aEffectChain,
                              float aOpacity,
                              const gfx::Matrix4x4& aTransform,
                              const gfx::Filter& aFilter,
-                             const gfx::IntRect& aClipRect,
+                             const gfx::Rect& aClipRect,
                              const nsIntRegion& aScreenRegion,
                              const IntPoint& aTextureOffset,
                              const IntSize& aTextureBounds,
                              const gfx::Rect& aVisibleRect)
 {
   MOZ_ASSERT(!aTile.IsPlaceholderTile());
 
   AutoLockTextureHost autoLock(aTile.mTextureHost);
@@ -582,17 +582,17 @@ TiledContentHost::RenderTile(TileHost& a
 }
 
 void
 TiledContentHost::RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
                                     const Color* aBackgroundColor,
                                     EffectChain& aEffectChain,
                                     float aOpacity,
                                     const gfx::Filter& aFilter,
-                                    const gfx::IntRect& aClipRect,
+                                    const gfx::Rect& aClipRect,
                                     nsIntRegion aVisibleRegion,
                                     gfx::Matrix4x4 aTransform)
 {
   if (!mCompositor) {
     NS_WARNING("Can't render tiled content host - no compositor");
     return;
   }
   float resolution = aLayerBuffer.GetResolution();
--- a/gfx/layers/composite/TiledContentHost.h
+++ b/gfx/layers/composite/TiledContentHost.h
@@ -248,17 +248,17 @@ public:
   bool UseTiledLayerBuffer(ISurfaceAllocator* aAllocator,
                            const SurfaceDescriptorTiles& aTiledDescriptor);
 
   virtual void Composite(LayerComposite* aLayer,
                          EffectChain& aEffectChain,
                          float aOpacity,
                          const gfx::Matrix4x4& aTransform,
                          const gfx::Filter& aFilter,
-                         const gfx::IntRect& aClipRect,
+                         const gfx::Rect& aClipRect,
                          const nsIntRegion* aVisibleRegion = nullptr) override;
 
   virtual CompositableType GetType() override { return CompositableType::CONTENT_TILED; }
 
   virtual TiledContentHost* AsTiledContentHost() override { return this; }
 
   virtual void Attach(Layer* aLayer,
                       Compositor* aCompositor,
@@ -277,27 +277,27 @@ public:
 
 private:
 
   void RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
                          const gfx::Color* aBackgroundColor,
                          EffectChain& aEffectChain,
                          float aOpacity,
                          const gfx::Filter& aFilter,
-                         const gfx::IntRect& aClipRect,
+                         const gfx::Rect& aClipRect,
                          nsIntRegion aMaskRegion,
                          gfx::Matrix4x4 aTransform);
 
   // Renders a single given tile.
   void RenderTile(TileHost& aTile,
                   EffectChain& aEffectChain,
                   float aOpacity,
                   const gfx::Matrix4x4& aTransform,
                   const gfx::Filter& aFilter,
-                  const gfx::IntRect& aClipRect,
+                  const gfx::Rect& aClipRect,
                   const nsIntRegion& aScreenRegion,
                   const gfx::IntPoint& aTextureOffset,
                   const gfx::IntSize& aTextureBounds,
                   const gfx::Rect& aVisibleRect);
 
   void EnsureTileStore() {}
 
   TiledLayerBufferComposite    mTiledBuffer;
--- a/gfx/layers/d3d11/CompositorD3D11.cpp
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -691,17 +691,17 @@ CompositorD3D11::ClearRect(const gfx::Re
 
   mContext->Draw(4, 0);
 
   mContext->OMSetBlendState(mAttachments->mPremulBlendState, sBlendFactor, 0xFFFFFFFF);
 }
 
 void
 CompositorD3D11::DrawVRDistortion(const gfx::Rect& aRect,
-                                  const gfx::IntRect& aClipRect,
+                                  const gfx::Rect& aClipRect,
                                   const EffectChain& aEffectChain,
                                   gfx::Float aOpacity,
                                   const gfx::Matrix4x4& aTransform)
 {
   MOZ_ASSERT(aEffectChain.mPrimaryEffect->mType == EffectTypes::VR_DISTORTION);
 
   if (aEffectChain.mSecondaryEffects[EffectTypes::MASK] ||
       aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE])
@@ -867,17 +867,17 @@ EffectToBlendLayerType(Effect* aEffect)
   default:
     MOZ_ASSERT_UNREACHABLE("blending not supported for this layer type");
     return 0;
   }
 }
 
 void
 CompositorD3D11::DrawQuad(const gfx::Rect& aRect,
-                          const gfx::IntRect& aClipRect,
+                          const gfx::Rect& aClipRect,
                           const EffectChain& aEffectChain,
                           gfx::Float aOpacity,
                           const gfx::Matrix4x4& aTransform,
                           const gfx::Rect& aVisibleRect)
 {
   if (mCurrentClip.IsEmpty()) {
     return;
   }
@@ -1111,37 +1111,37 @@ CompositorD3D11::DrawQuad(const gfx::Rec
 
   if (restoreBlendMode) {
     mContext->OMSetBlendState(mAttachments->mPremulBlendState, sBlendFactor, 0xFFFFFFFF);
   }
 }
 
 void
 CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion,
-                            const IntRect* aClipRectIn,
-                            const IntRect& aRenderBounds,
+                            const Rect* aClipRectIn,
+                            const Rect& aRenderBounds,
                             const nsIntRegion& aOpaqueRegion,
-                            IntRect* aClipRectOut,
-                            IntRect* aRenderBoundsOut)
+                            Rect* aClipRectOut,
+                            Rect* aRenderBoundsOut)
 {
   // Don't composite if we are minimised. Other than for the sake of efficency,
   // this is important because resizing our buffers when mimised will fail and
   // cause a crash when we're restored.
   NS_ASSERTION(mHwnd, "Couldn't find an HWND when initialising?");
   if (::IsIconic(mHwnd) || mDevice->GetDeviceRemovedReason() != S_OK) {
-    *aRenderBoundsOut = IntRect();
+    *aRenderBoundsOut = Rect();
     return;
   }
 
   LayoutDeviceIntSize oldSize = mSize;
 
   // Failed to create a render target or the view.
   if (!UpdateRenderTarget() || !mDefaultRT || !mDefaultRT->mRTView ||
       mSize.width <= 0 || mSize.height <= 0) {
-    *aRenderBoundsOut = IntRect();
+    *aRenderBoundsOut = Rect();
     return;
   }
 
   IntRect intRect = IntRect(IntPoint(0, 0), mSize.ToUnknownSize());
   // Sometimes the invalid region is larger than we want to draw.
   nsIntRegion invalidRegionSafe;
 
   if (mSize != oldSize) {
@@ -1168,20 +1168,20 @@ CompositorD3D11::BeginFrame(const nsIntR
   UINT size = sizeof(Vertex);
   UINT offset = 0;
   mContext->IASetVertexBuffers(0, 1, &buffer, &size, &offset);
 
   mInvalidRect = IntRect(invalidRect.x, invalidRect.y, invalidRect.width, invalidRect.height);
   mInvalidRegion = invalidRegionSafe;
 
   if (aClipRectOut) {
-    *aClipRectOut = IntRect(0, 0, mSize.width, mSize.height);
+    *aClipRectOut = Rect(0, 0, mSize.width, mSize.height);
   }
   if (aRenderBoundsOut) {
-    *aRenderBoundsOut = IntRect(0, 0, mSize.width, mSize.height);
+    *aRenderBoundsOut = Rect(0, 0, mSize.width, mSize.height);
   }
 
   mCurrentClip = IntRect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
 
   mContext->RSSetState(mAttachments->mRasterizerState);
 
   SetRenderTarget(mDefaultRT);
 
--- a/gfx/layers/d3d11/CompositorD3D11.h
+++ b/gfx/layers/d3d11/CompositorD3D11.h
@@ -88,39 +88,39 @@ public:
       NS_RUNTIMEABORT("SetScreenRenderOffset not supported by CompositorD3D11.");
     }
     // If the offset is 0, 0 that's okay.
   }
 
   virtual void ClearRect(const gfx::Rect& aRect) override;
 
   virtual void DrawQuad(const gfx::Rect &aRect,
-                        const gfx::IntRect &aClipRect,
+                        const gfx::Rect &aClipRect,
                         const EffectChain &aEffectChain,
                         gfx::Float aOpacity,
                         const gfx::Matrix4x4& aTransform,
                         const gfx::Rect& aVisibleRect) override;
 
   /* Helper for when the primary effect is VR_DISTORTION */
   void DrawVRDistortion(const gfx::Rect &aRect,
-                        const gfx::IntRect &aClipRect,
+                        const gfx::Rect &aClipRect,
                         const EffectChain &aEffectChain,
                         gfx::Float aOpacity,
                         const gfx::Matrix4x4 &aTransform);
 
   /**
    * Start a new frame. If aClipRectIn is null, sets *aClipRectOut to the
    * screen dimensions. 
    */
   virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
-                          const gfx::IntRect *aClipRectIn,
-                          const gfx::IntRect& aRenderBounds,
+                          const gfx::Rect *aClipRectIn,
+                          const gfx::Rect& aRenderBounds,
                           const nsIntRegion& aOpaqueRegion,
-                          gfx::IntRect *aClipRectOut = nullptr,
-                          gfx::IntRect *aRenderBoundsOut = nullptr) override;
+                          gfx::Rect *aClipRectOut = nullptr,
+                          gfx::Rect *aRenderBoundsOut = nullptr) override;
 
   /**
    * Flush the current frame to the screen.
    */
   virtual void EndFrame() override;
 
   /**
    * Post rendering stuff if the rendering is outside of this Compositor
--- a/gfx/layers/d3d9/CompositorD3D9.cpp
+++ b/gfx/layers/d3d9/CompositorD3D9.cpp
@@ -237,17 +237,17 @@ CompositorD3D9::ClearRect(const gfx::Rec
   rect.y2 = aRect.YMost();
 
   device()->Clear(1, &rect, D3DCLEAR_TARGET,
                   0x00000000, 0, 0);
 }
 
 void
 CompositorD3D9::DrawQuad(const gfx::Rect &aRect,
-                         const gfx::IntRect &aClipRect,
+                         const gfx::Rect &aClipRect,
                          const EffectChain &aEffectChain,
                          gfx::Float aOpacity,
                          const gfx::Matrix4x4& aTransform,
                          const gfx::Rect& aVisibleRect)
 {
   if (!mDeviceManager) {
     return;
   }
@@ -666,36 +666,36 @@ CompositorD3D9::FailedToResetDevice() {
     mFailedResetAttempts = 0;
     gfxWindowsPlatform::GetPlatform()->D3D9DeviceReset();
     gfxCriticalNote << "[D3D9] Unable to get a working D3D9 Compositor";
   }
 }
 
 void
 CompositorD3D9::BeginFrame(const nsIntRegion& aInvalidRegion,
-                           const IntRect *aClipRectIn,
-                           const IntRect& aRenderBounds,
+                           const Rect *aClipRectIn,
+                           const Rect& aRenderBounds,
                            const nsIntRegion& aOpaqueRegion,
-                           IntRect *aClipRectOut,
-                           IntRect *aRenderBoundsOut)
+                           Rect *aClipRectOut,
+                           Rect *aRenderBoundsOut)
 {
   MOZ_ASSERT(mDeviceManager && mSwapChain);
 
   mDeviceManager->SetupRenderState();
 
   EnsureSize();
 
   device()->Clear(0, nullptr, D3DCLEAR_TARGET, 0x00000000, 0, 0);
   device()->BeginScene();
 
   if (aClipRectOut) {
-    *aClipRectOut = IntRect(0, 0, mSize.width, mSize.height);
+    *aClipRectOut = Rect(0, 0, mSize.width, mSize.height);
   }
   if (aRenderBoundsOut) {
-    *aRenderBoundsOut = IntRect(0, 0, mSize.width, mSize.height);
+    *aRenderBoundsOut = Rect(0, 0, mSize.width, mSize.height);
   }
 
   RECT r;
   if (aClipRectIn) {
     r.left = (LONG)aClipRectIn->x;
     r.top = (LONG)aClipRectIn->y;
     r.right = (LONG)(aClipRectIn->x + aClipRectIn->width);
     r.bottom = (LONG)(aClipRectIn->y + aClipRectIn->height);
--- a/gfx/layers/d3d9/CompositorD3D9.h
+++ b/gfx/layers/d3d9/CompositorD3D9.h
@@ -52,28 +52,28 @@ public:
     return mCurrentRT;
   }
 
   virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) override {}
 
   virtual void ClearRect(const gfx::Rect& aRect) override;
 
   virtual void DrawQuad(const gfx::Rect &aRect,
-                        const gfx::IntRect &aClipRect,
+                        const gfx::Rect &aClipRect,
                         const EffectChain &aEffectChain,
                         gfx::Float aOpacity,
                         const gfx::Matrix4x4& aTransform,
                         const gfx::Rect& aVisibleRect) override;
 
   virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
-                          const gfx::IntRect *aClipRectIn,
-                          const gfx::IntRect& aRenderBounds,
+                          const gfx::Rect *aClipRectIn,
+                          const gfx::Rect& aRenderBounds,
                           const nsIntRegion& aOpaqueRegion,
-                          gfx::IntRect *aClipRectOut = nullptr,
-                          gfx::IntRect *aRenderBoundsOut = nullptr) override;
+                          gfx::Rect *aClipRectOut = nullptr,
+                          gfx::Rect *aRenderBoundsOut = nullptr) override;
 
   virtual void EndFrame() override;
 
   virtual void EndFrameForExternalComposition(const gfx::Matrix& aTransform) override {}
 
   virtual void PrepareViewport(const gfx::IntSize& aSize);
 
   virtual bool SupportsPartialTextureUpdate() override{ return true; }
--- a/gfx/layers/ipc/CompositorBench.cpp
+++ b/gfx/layers/ipc/CompositorBench.cpp
@@ -413,17 +413,17 @@ static void RunCompositorBench(Composito
     printf_stderr("\n", test->ToString());
   }
 
   for (size_t i = 0; i < tests.size(); i++) {
     delete tests[i];
   }
 }
 
-void CompositorBench(Compositor* aCompositor, const gfx::IntRect& aScreenRect)
+void CompositorBench(Compositor* aCompositor, const gfx::Rect& aScreenRect)
 {
   static bool sRanBenchmark = false;
   bool wantBenchmark = gfxPrefs::LayersBenchEnabled();
   if (wantBenchmark && !sRanBenchmark) {
     RunCompositorBench(aCompositor, aScreenRect);
   }
   sRanBenchmark = wantBenchmark;
 }
--- a/gfx/layers/ipc/CompositorBench.h
+++ b/gfx/layers/ipc/CompositorBench.h
@@ -13,19 +13,19 @@ namespace mozilla {
 namespace layers {
 
 class Compositor;
 
 // Uncomment this line to rebuild with compositor bench.
 // #define MOZ_COMPOSITOR_BENCH
 
 #ifdef MOZ_COMPOSITOR_BENCH
-void CompositorBench(Compositor* aCompositor, const gfx::IntRect& aScreenRect);
+void CompositorBench(Compositor* aCompositor, const gfx::Rect& aScreenRect);
 #else
-static inline void CompositorBench(Compositor* aCompositor, const gfx::IntRect& aScreenRect) {}
+static inline void CompositorBench(Compositor* aCompositor, const gfx::Rect& aScreenRect) {}
 #endif
 
 } // namespace layers
 } // namespace mozilla
 
 #endif
 
 
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -622,32 +622,32 @@ CompositorOGL::ClearRect(const gfx::Rect
   ScopedGLState scopedScissorTestState(mGLContext, LOCAL_GL_SCISSOR_TEST, true);
   ScopedScissorRect autoScissorRect(mGLContext, aRect.x, y, aRect.width, aRect.height);
   mGLContext->fClearColor(0.0, 0.0, 0.0, 0.0);
   mGLContext->fClear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT);
 }
 
 void
 CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
-                          const IntRect *aClipRectIn,
-                          const IntRect& aRenderBounds,
+                          const Rect *aClipRectIn,
+                          const Rect& aRenderBounds,
                           const nsIntRegion& aOpaqueRegion,
-                          IntRect *aClipRectOut,
-                          IntRect *aRenderBoundsOut)
+                          Rect *aClipRectOut,
+                          Rect *aRenderBoundsOut)
 {
   PROFILER_LABEL("CompositorOGL", "BeginFrame",
     js::ProfileEntry::Category::GRAPHICS);
 
   MOZ_ASSERT(!mFrameInProgress, "frame still in progress (should have called EndFrame");
 
-  gfx::IntRect rect;
+  gfx::Rect rect;
   if (mUseExternalSurfaceSize) {
-    rect = gfx::IntRect(0, 0, mSurfaceSize.width, mSurfaceSize.height);
+    rect = gfx::Rect(0, 0, mSurfaceSize.width, mSurfaceSize.height);
   } else {
-    rect = gfx::IntRect(aRenderBounds.x, aRenderBounds.y, aRenderBounds.width, aRenderBounds.height);
+    rect = gfx::Rect(aRenderBounds.x, aRenderBounds.y, aRenderBounds.width, aRenderBounds.height);
   }
 
   if (aRenderBoundsOut) {
     *aRenderBoundsOut = rect;
   }
 
   GLint width = rect.width;
   GLint height = rect.height;
@@ -983,17 +983,17 @@ CompositorOGL::GetLineCoefficients(const
   // wide and included within the interior of the polygon
   coeffecients.z += 0.5f;
 
   return coeffecients;
 }
 
 void
 CompositorOGL::DrawQuad(const Rect& aRect,
-                        const IntRect& aClipRect,
+                        const Rect& aClipRect,
                         const EffectChain &aEffectChain,
                         Float aOpacity,
                         const gfx::Matrix4x4& aTransform,
                         const gfx::Rect& aVisibleRect)
 {
   PROFILER_LABEL("CompositorOGL", "DrawQuad",
     js::ProfileEntry::Category::GRAPHICS);
 
@@ -1004,17 +1004,17 @@ CompositorOGL::DrawQuad(const Rect& aRec
     DrawVRDistortion(aRect, aClipRect, aEffectChain, aOpacity, aTransform);
     return;
   }
 
   IntPoint offset = mCurrentRenderTarget->GetOrigin();
   IntSize size = mCurrentRenderTarget->GetSize();
 
   Rect renderBound(0, 0, size.width, size.height);
-  renderBound.IntersectRect(renderBound, Rect(aClipRect));
+  renderBound.IntersectRect(renderBound, aClipRect);
   renderBound.MoveBy(offset);
 
   Rect destRect = aTransform.TransformAndClipBounds(aRect, renderBound);
 
   // XXX: This doesn't handle 3D transforms. It also doesn't handled rotated
   //      quads. Fix me.
   mPixelsFilled += destRect.width * destRect.height;
 
@@ -1024,27 +1024,29 @@ CompositorOGL::DrawQuad(const Rect& aRec
   destRect.MoveBy(-offset);
   renderBound = Rect(0, 0, size.width, size.height);
   if (!renderBound.Intersects(destRect)) {
     return;
   }
 
   LayerScope::DrawBegin();
 
-  IntRect clipRect = aClipRect;
+  Rect clipRect = aClipRect;
   // aClipRect is in destination coordinate space (after all
   // transforms and offsets have been applied) so if our
   // drawing is going to be shifted by mRenderOffset then we need
   // to shift the clip rect by the same amount.
   if (!mTarget && mCurrentRenderTarget->IsWindow()) {
     clipRect.MoveBy(mRenderOffset.x, mRenderOffset.y);
   }
+  IntRect intClipRect;
+  clipRect.ToIntRect(&intClipRect);
 
-  gl()->fScissor(clipRect.x, FlipY(clipRect.y + clipRect.height),
-                 clipRect.width, clipRect.height);
+  gl()->fScissor(intClipRect.x, FlipY(intClipRect.y + intClipRect.height),
+                 intClipRect.width, intClipRect.height);
 
   MaskType maskType;
   EffectMask* effectMask;
   TextureSourceOGL* sourceMask = nullptr;
   gfx::Matrix4x4 maskQuadTransform;
   if (aEffectChain.mSecondaryEffects[EffectTypes::MASK]) {
     effectMask = static_cast<EffectMask*>(aEffectChain.mSecondaryEffects[EffectTypes::MASK].get());
     sourceMask = effectMask->mMaskTexture->AsSourceOGL();
--- a/gfx/layers/opengl/CompositorOGL.h
+++ b/gfx/layers/opengl/CompositorOGL.h
@@ -229,17 +229,17 @@ public:
   CreateRenderTargetFromSource(const gfx::IntRect &aRect,
                                const CompositingRenderTarget *aSource,
                                const gfx::IntPoint &aSourcePoint) override;
 
   virtual void SetRenderTarget(CompositingRenderTarget *aSurface) override;
   virtual CompositingRenderTarget* GetCurrentRenderTarget() const override;
 
   virtual void DrawQuad(const gfx::Rect& aRect,
-                        const gfx::IntRect& aClipRect,
+                        const gfx::Rect& aClipRect,
                         const EffectChain &aEffectChain,
                         gfx::Float aOpacity,
                         const gfx::Matrix4x4& aTransform,
                         const gfx::Rect& aVisibleRect) override;
 
   virtual void EndFrame() override;
   virtual void EndFrameForExternalComposition(const gfx::Matrix& aTransform) override;
 
@@ -337,17 +337,17 @@ public:
     return mRenderOffset;
   }
 
 private:
   bool InitializeVR();
   void DestroyVR(GLContext *gl);
 
   void DrawVRDistortion(const gfx::Rect& aRect,
-                        const gfx::IntRect& aClipRect,
+                        const gfx::Rect& aClipRect,
                         const EffectChain& aEffectChain,
                         gfx::Float aOpacity,
                         const gfx::Matrix4x4& aTransform);
 
   void PrepareViewport(CompositingRenderTargetOGL *aRenderTarget);
 
   /** Widget associated with this compositor */
   LayoutDeviceIntSize mWidgetSize;
@@ -395,21 +395,21 @@ private:
    * Clear aRect on current render target.
    */
   virtual void ClearRect(const gfx::Rect& aRect) override;
 
   /* Start a new frame. If aClipRectIn is null and aClipRectOut is non-null,
    * sets *aClipRectOut to the screen dimensions.
    */
   virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
-                          const gfx::IntRect *aClipRectIn,
-                          const gfx::IntRect& aRenderBounds,
+                          const gfx::Rect *aClipRectIn,
+                          const gfx::Rect& aRenderBounds,
                           const nsIntRegion& aOpaqueRegion,
-                          gfx::IntRect *aClipRectOut = nullptr,
-                          gfx::IntRect *aRenderBoundsOut = nullptr) override;
+                          gfx::Rect *aClipRectOut = nullptr,
+                          gfx::Rect *aRenderBoundsOut = nullptr) override;
 
   ShaderConfigOGL GetShaderConfigFor(Effect *aEffect,
                                      MaskType aMask = MaskType::MaskNone,
                                      gfx::CompositionOp aOp = gfx::CompositionOp::OP_OVER,
                                      bool aColorMatrix = false,
                                      bool aDEAAEnabled = false) const;
   ShaderProgramOGL* GetShaderProgramFor(const ShaderConfigOGL &aConfig);
 
--- a/gfx/layers/opengl/CompositorOGLVR.cpp
+++ b/gfx/layers/opengl/CompositorOGLVR.cpp
@@ -199,17 +199,17 @@ CompositorOGL::DestroyVR(GLContext *gl)
   gl->fDeleteProgram(mVR.mDistortionProgram[0]);
   gl->fDeleteProgram(mVR.mDistortionProgram[1]);
 
   mVR.mInitialized = false;
 }
 
 void
 CompositorOGL::DrawVRDistortion(const gfx::Rect& aRect,
-                                const gfx::IntRect& aClipRect,
+                                const gfx::Rect& aClipRect,
                                 const EffectChain& aEffectChain,
                                 gfx::Float aOpacity,
                                 const gfx::Matrix4x4& aTransform)
 {
   MOZ_ASSERT(aEffectChain.mPrimaryEffect->mType == EffectTypes::VR_DISTORTION);
   MOZ_ASSERT(mVR.mInitialized);
 
   if (aEffectChain.mSecondaryEffects[EffectTypes::MASK] ||