Bug 1239537 - Remove Compositor::GetWidgetSize(), which is unused. r=mattwoodrow.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 13 Jan 2016 15:27:34 -0800
changeset 280052 522e0b08775e7b8b5bae47f893701533f6f72df6
parent 280051 34a6488a7b2069a53495b04be8cbfafde17ba423
child 280053 3c18be4736c724170aac5f811246c3caa22a864d
push id70320
push usernnethercote@mozilla.com
push dateFri, 15 Jan 2016 02:36:53 +0000
treeherdermozilla-inbound@522e0b08775e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1239537
milestone46.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 1239537 - Remove Compositor::GetWidgetSize(), which is unused. r=mattwoodrow. Also remove BasicCompositor::mWidgetSize because its only use can be replaced by a temporary variable.
gfx/layers/Compositor.h
gfx/layers/basic/BasicCompositor.cpp
gfx/layers/basic/BasicCompositor.h
gfx/layers/d3d11/CompositorD3D11.h
gfx/layers/d3d9/CompositorD3D9.h
gfx/layers/opengl/CompositorOGL.h
--- a/gfx/layers/Compositor.h
+++ b/gfx/layers/Compositor.h
@@ -527,18 +527,16 @@ protected:
    * current frame. This value is an approximation and is not accurate,
    * especially in the presence of transforms.
    */
   size_t mPixelsPerFrame;
   size_t mPixelsFilled;
 
   ScreenRotation mScreenRotation;
 
-  virtual LayoutDeviceIntSize GetWidgetSize() const = 0;
-
   RefPtr<gfx::DrawTarget> mTarget;
   gfx::IntRect mTargetBounds;
 
 #if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 17
   FenceHandle mReleaseFenceHandle;
 #endif
 
 private:
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -515,18 +515,17 @@ BasicCompositor::ClearRect(const gfx::Re
 
 void
 BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
                             const gfx::Rect *aClipRectIn,
                             const gfx::Rect& aRenderBounds,
                             gfx::Rect *aClipRectOut /* = nullptr */,
                             gfx::Rect *aRenderBoundsOut /* = nullptr */)
 {
-  mWidgetSize = mWidget->GetClientSize();
-  LayoutDeviceIntRect intRect(LayoutDeviceIntPoint(), mWidgetSize);
+  LayoutDeviceIntRect intRect(LayoutDeviceIntPoint(), mWidget->GetClientSize());
   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;
--- a/gfx/layers/basic/BasicCompositor.h
+++ b/gfx/layers/basic/BasicCompositor.h
@@ -111,21 +111,18 @@ public:
   }
 
   virtual nsIWidget* GetWidget() const override { return mWidget; }
 
   gfx::DrawTarget *GetDrawTarget() { return mDrawTarget; }
 
 private:
 
-  virtual LayoutDeviceIntSize GetWidgetSize() const override { return mWidgetSize; }
-
   // Widget associated with this compositor
   nsIWidget *mWidget;
-  LayoutDeviceIntSize mWidgetSize;
 
   // The final destination surface
   RefPtr<gfx::DrawTarget> mDrawTarget;
   // The current render target for drawing
   RefPtr<BasicCompositingRenderTarget> mRenderTarget;
 
   LayoutDeviceIntRect mInvalidRect;
   LayoutDeviceIntRegion mInvalidRegion;
--- a/gfx/layers/d3d11/CompositorD3D11.h
+++ b/gfx/layers/d3d11/CompositorD3D11.h
@@ -166,18 +166,16 @@ private:
   void EnsureSize();
   bool VerifyBufferSize();
   bool UpdateRenderTarget();
   bool UpdateConstantBuffers();
   void SetSamplerForFilter(gfx::Filter aFilter);
   void SetPSForEffect(Effect *aEffect, MaskType aMaskType, gfx::SurfaceFormat aFormat);
   void PaintToTarget();
 
-  virtual LayoutDeviceIntSize GetWidgetSize() const override { return mSize; }
-
   RefPtr<ID3D11DeviceContext> mContext;
   RefPtr<ID3D11Device> mDevice;
   RefPtr<IDXGISwapChain> mSwapChain;
   RefPtr<CompositingRenderTargetD3D11> mDefaultRT;
   RefPtr<CompositingRenderTargetD3D11> mCurrentRT;
 
   DeviceAttachmentsD3D11* mAttachments;
 
--- a/gfx/layers/d3d9/CompositorD3D9.h
+++ b/gfx/layers/d3d9/CompositorD3D9.h
@@ -147,21 +147,16 @@ private:
    * the cpp file).
    */
   void CheckResetCount();
 
   void FailedToResetDevice();
 
   void ReportFailure(const nsACString &aMsg, HRESULT aCode);
 
-  virtual LayoutDeviceIntSize GetWidgetSize() const override
-  {
-    return mSize;
-  }
-
   /* Device manager instance for this compositor */
   RefPtr<DeviceManagerD3D9> mDeviceManager;
 
   /* Swap chain associated with this compositor */
   RefPtr<SwapChainD3D9> mSwapChain;
 
   /* Widget associated with this layer manager */
   nsIWidget *mWidget;
--- a/gfx/layers/opengl/CompositorOGL.h
+++ b/gfx/layers/opengl/CompositorOGL.h
@@ -300,21 +300,16 @@ public:
     return gfx::IntSize (mSurfaceSize.width, mSurfaceSize.height);
   }
 
   const ScreenPoint& GetScreenRenderOffset() const {
     return mRenderOffset;
   }
 
 private:
-  virtual LayoutDeviceIntSize GetWidgetSize() const override
-  {
-    return mWidgetSize;
-  }
-
   bool InitializeVR();
   void DestroyVR(GLContext *gl);
 
   void DrawVRDistortion(const gfx::Rect& aRect,
                         const gfx::Rect& aClipRect,
                         const EffectChain& aEffectChain,
                         gfx::Float aOpacity,
                         const gfx::Matrix4x4& aTransform);