Backed out 3 changesets (bug 1178376) for android reftest bustage CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 11 Sep 2015 11:20:23 -0700
changeset 294676 f37d3294ec16634db538951c2f74148a12e4773a
parent 294675 1fd3662ece10b3de40a53fd092479f7ff9c48cbc
child 294677 d48fbf99a903bf9eb4eb843d1f692737eba971dd
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1178376
milestone43.0a1
backs out9394c5f63b56b784dcdb9f70fa0b7f428bdf4d8c
83295d5f54a9e6a70ae1b9903f9e999ae0c90f1f
5e1c6511123a1007ca23113b05df89f22ec9ff22
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 3 changesets (bug 1178376) for android reftest bustage CLOSED TREE Backed out changeset 9394c5f63b56 (bug 1178376) Backed out changeset 83295d5f54a9 (bug 1178376) Backed out changeset 5e1c6511123a (bug 1178376)
gfx/layers/Layers.h
gfx/layers/client/ClientTiledPaintedLayer.cpp
gfx/layers/client/SingleTiledContentClient.cpp
gfx/layers/client/SingleTiledContentClient.h
gfx/layers/client/TiledContentClient.cpp
gfx/layers/client/TiledContentClient.h
gfx/layers/composite/ContentHost.h
gfx/layers/composite/PaintedLayerComposite.cpp
gfx/layers/composite/PaintedLayerComposite.h
gfx/layers/composite/TiledContentHost.cpp
gfx/layers/composite/TiledContentHost.h
gfx/layers/ipc/LayersMessages.ipdlh
gfx/thebes/gfxPrefs.h
--- a/gfx/layers/Layers.h
+++ b/gfx/layers/Layers.h
@@ -1588,17 +1588,17 @@ public:
   void GetDisplayListLog(nsCString& log);
 
   static bool IsLogEnabled() { return LayerManager::IsLogEnabled(); }
 
   /**
    * Returns the current area of the layer (in layer-space coordinates)
    * marked as needed to be recomposited.
    */
-  const virtual nsIntRegion GetInvalidRegion() { return mInvalidRegion; }
+  const nsIntRegion& GetInvalidRegion() { return mInvalidRegion; }
   const void SetInvalidRegion(const nsIntRegion& aRect) { mInvalidRegion = aRect; }
 
   /**
    * Mark the entirety of the layer's visible region as being invalid.
    */
   void SetInvalidRectToVisibleRegion() { mInvalidRegion = GetVisibleRegion(); }
 
   /**
--- a/gfx/layers/client/ClientTiledPaintedLayer.cpp
+++ b/gfx/layers/client/ClientTiledPaintedLayer.cpp
@@ -164,18 +164,17 @@ ClientTiledPaintedLayer::BeginPaint()
 
   LayerRect layerBounds = ViewAs<LayerPixel>(Rect(GetLayerBounds()));
 
   // Compute the critical display port that applies to this layer in the
   // LayoutDevice space of this layer, but only if there is no OMT animation
   // on this layer. If there is an OMT animation then we need to draw the whole
   // visible region of this layer as determined by layout, because we don't know
   // what parts of it might move into view in the compositor.
-  mPaintData.mHasTransformAnimation = hasTransformAnimation;
-  if (!mPaintData.mHasTransformAnimation &&
+  if (!hasTransformAnimation &&
       mContentClient->GetLowPrecisionTiledBuffer()) {
     ParentLayerRect criticalDisplayPort =
       (displayportMetrics.GetCriticalDisplayPort() * displayportMetrics.GetZoom())
       + displayportMetrics.GetCompositionBounds().TopLeft();
     Maybe<LayerRect> criticalDisplayPortTransformed =
       ApplyParentLayerToLayerTransform(transformDisplayPortToLayer, criticalDisplayPort, layerBounds);
     if (!criticalDisplayPortTransformed) {
       mPaintData.ResetPaintData();
@@ -252,35 +251,36 @@ ClientTiledPaintedLayer::UseProgressiveD
 
   if (ClientManager()->HasShadowTarget()) {
     // This condition is true when we are in a reftest scenario. We don't want
     // to draw progressively here because it can cause intermittent reftest
     // failures because the harness won't wait for all the tiles to be drawn.
     return false;
   }
 
+  if (mPaintData.mCriticalDisplayPort.IsEmpty()) {
+    // This catches three scenarios:
+    // 1) This layer doesn't have a scrolling ancestor
+    // 2) This layer is subject to OMTA transforms
+    // 3) Low-precision painting is disabled
+    // In all of these cases, we don't want to draw this layer progressively.
+    return false;
+  }
+
   if (GetIsFixedPosition() || GetParent()->GetIsFixedPosition()) {
     // This layer is fixed-position and so even if it does have a scrolling
     // ancestor it will likely be entirely on-screen all the time, so we
     // should draw it all at once
     return false;
   }
 
-  if (mPaintData.mHasTransformAnimation) {
-    // The compositor is going to animate this somehow, so we want it all
-    // on the screen at once.
-    return false;
-  }
-
   if (ClientManager()->AsyncPanZoomEnabled()) {
     LayerMetricsWrapper scrollAncestor;
     GetAncestorLayers(&scrollAncestor, nullptr, nullptr);
-    if (!scrollAncestor) {
-      return false;
-    }
+    MOZ_ASSERT(scrollAncestor); // because mPaintData.mCriticalDisplayPort is non-empty
     const FrameMetrics& parentMetrics = scrollAncestor.Metrics();
     if (!IsScrollingOnCompositor(parentMetrics)) {
       return false;
     }
   }
 
   return true;
 }
--- a/gfx/layers/client/SingleTiledContentClient.cpp
+++ b/gfx/layers/client/SingleTiledContentClient.cpp
@@ -40,17 +40,16 @@ SingleTiledContentClient::UpdatedBuffer(
   mTiledBuffer->ClearPaintedRegion();
 }
 
 ClientSingleTiledLayerBuffer::ClientSingleTiledLayerBuffer(ClientTiledPaintedLayer* aPaintedLayer,
                                                            CompositableClient* aCompositableClient,
                                                            ClientLayerManager* aManager)
   : ClientTiledLayerBuffer(aPaintedLayer, aCompositableClient)
   , mManager(aManager)
-  , mWasLastPaintProgressive(false)
 {
 }
 
 void
 ClientSingleTiledLayerBuffer::ReadLock() {
   if (!mTile.IsPlaceholderTile()) {
     mTile.ReadLock();
   }
@@ -85,38 +84,34 @@ ClientSingleTiledLayerBuffer::GetSurface
 
   return SurfaceDescriptorTiles(mValidRegion,
                                 tiles,
                                 mTilingOrigin,
                                 mSize,
                                 0, 0, 1, 1,
                                 1.0,
                                 mFrameResolution.xScale,
-                                mFrameResolution.yScale,
-                                mWasLastPaintProgressive);
+                                mFrameResolution.yScale);
 }
 
 already_AddRefed<TextureClient>
 ClientSingleTiledLayerBuffer::GetTextureClient()
 {
   return mCompositableClient->CreateTextureClientForDrawing(
     gfx::ImageFormatToSurfaceFormat(mFormat), mSize, BackendSelector::Content,
     TextureFlags::IMMEDIATE_UPLOAD);
 }
 
 void
 ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
                                           const nsIntRegion& aPaintRegion,
                                           const nsIntRegion& aDirtyRegion,
                                           LayerManager::DrawPaintedLayerCallback aCallback,
-                                          void* aCallbackData,
-                                          bool aIsProgressive)
+                                          void* aCallbackData)
 {
-  mWasLastPaintProgressive = aIsProgressive;
-
   // Compare layer visible region size to current backbuffer size, discard if not matching.
   IntSize size = mPaintedLayer->GetVisibleRegion().GetBounds().Size();
   IntPoint origin = mPaintedLayer->GetVisibleRegion().GetBounds().TopLeft();
   nsIntRegion paintRegion = aPaintRegion;
   if (mSize != size ||
       mTilingOrigin != origin) {
     ResetPaintedAndValidState();
     mSize = size;
--- a/gfx/layers/client/SingleTiledContentClient.h
+++ b/gfx/layers/client/SingleTiledContentClient.h
@@ -36,18 +36,17 @@ public:
   void ReturnTextureClientDeferred(TextureClient* aClient) override {}
   void ReportClientLost() override {}
 
   // ClientTiledLayerBuffer
   void PaintThebes(const nsIntRegion& aNewValidRegion,
                    const nsIntRegion& aPaintRegion,
                    const nsIntRegion& aDirtyRegion,
                    LayerManager::DrawPaintedLayerCallback aCallback,
-                   void* aCallbackData,
-                   bool aIsProgressive = false) override;
+                   void* aCallbackData) override;
  
   bool SupportsProgressiveUpdate() override { return false; }
   bool ProgressiveUpdate(nsIntRegion& aValidRegion,
                          nsIntRegion& aInvalidRegion,
                          const nsIntRegion& aOldValidRegion,
                          BasicTiledLayerPaintData* aPaintData,
                          LayerManager::DrawPaintedLayerCallback aCallback,
                          void* aCallbackData) override
@@ -84,17 +83,16 @@ public:
 
 private:
   TileClient mTile;
 
   ClientLayerManager* mManager;
 
   nsIntRegion mPaintedRegion;
   nsIntRegion mValidRegion;
-  bool mWasLastPaintProgressive;
 
   /**
    * While we're adding tiles, this is used to keep track of the position of
    * the top-left of the top-left-most tile.  When we come to wrap the tiles in
    * TiledDrawTarget we subtract the value of this member from each tile's
    * offset so that all the tiles have a positive offset, then add a
    * translation to the TiledDrawTarget to compensate.  This is important so
    * that the mRect of the TiledDrawTarget is always at a positive x/y
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -492,17 +492,17 @@ TileClient::PrivateProtector::Set(TileCl
 void
 TileClient::PrivateProtector::Set(TileClient * const aContainer, TextureClient* aNewValue)
 {
   Set(aContainer, RefPtr<TextureClient>(aNewValue));
 }
 
 // Placeholder
 TileClient::TileClient()
-  : mCompositableClient(nullptr), mWasPlaceholder(false)
+  : mCompositableClient(nullptr)
 {
 }
 
 TileClient::~TileClient()
 {
   if (mExpirationState.IsTracked()) {
     MOZ_ASSERT(mBackBuffer);
     TileExpiry::RemoveTile(this);
@@ -513,17 +513,16 @@ TileClient::TileClient(const TileClient&
 {
   mBackBuffer.Set(this, o.mBackBuffer);
   mBackBufferOnWhite = o.mBackBufferOnWhite;
   mFrontBuffer = o.mFrontBuffer;
   mFrontBufferOnWhite = o.mFrontBufferOnWhite;
   mBackLock = o.mBackLock;
   mFrontLock = o.mFrontLock;
   mCompositableClient = o.mCompositableClient;
-  mWasPlaceholder = o.mWasPlaceholder;
   mUpdateRect = o.mUpdateRect;
 #ifdef GFX_TILEDLAYER_DEBUG_OVERLAY
   mLastUpdate = o.mLastUpdate;
 #endif
   mManager = o.mManager;
   mAllocator = o.mAllocator;
   mInvalidFront = o.mInvalidFront;
   mInvalidBack = o.mInvalidBack;
@@ -535,17 +534,16 @@ TileClient::operator=(const TileClient& 
   if (this == &o) return *this;
   mBackBuffer.Set(this, o.mBackBuffer);
   mBackBufferOnWhite = o.mBackBufferOnWhite;
   mFrontBuffer = o.mFrontBuffer;
   mFrontBufferOnWhite = o.mFrontBufferOnWhite;
   mBackLock = o.mBackLock;
   mFrontLock = o.mFrontLock;
   mCompositableClient = o.mCompositableClient;
-  mWasPlaceholder = o.mWasPlaceholder;
   mUpdateRect = o.mUpdateRect;
 #ifdef GFX_TILEDLAYER_DEBUG_OVERLAY
   mLastUpdate = o.mLastUpdate;
 #endif
   mManager = o.mManager;
   mAllocator = o.mAllocator;
   mInvalidFront = o.mInvalidFront;
   mInvalidBack = o.mInvalidBack;
@@ -839,42 +837,37 @@ TileClient::GetBackBuffer(const nsIntReg
   *aBackBufferOnWhite = mBackBufferOnWhite;
   return mBackBuffer;
 }
 
 TileDescriptor
 TileClient::GetTileDescriptor()
 {
   if (IsPlaceholderTile()) {
-    mWasPlaceholder = true;
     return PlaceholderTileDescriptor();
   }
   MOZ_ASSERT(mFrontLock);
-  bool wasPlaceholder = mWasPlaceholder;
-  mWasPlaceholder = false;
   if (mFrontLock->GetType() == gfxSharedReadLock::TYPE_MEMORY) {
     // AddRef here and Release when receiving on the host side to make sure the
     // reference count doesn't go to zero before the host receives the message.
     // see TiledLayerBufferComposite::TiledLayerBufferComposite
     mFrontLock.get()->AddRef();
   }
 
   if (mFrontLock->GetType() == gfxSharedReadLock::TYPE_MEMORY) {
     return TexturedTileDescriptor(nullptr, mFrontBuffer->GetIPDLActor(),
                                   mFrontBufferOnWhite ? MaybeTexture(mFrontBufferOnWhite->GetIPDLActor()) : MaybeTexture(null_t()),
                                   mUpdateRect,
-                                  TileLock(uintptr_t(mFrontLock.get())),
-                                  wasPlaceholder);
+                                  TileLock(uintptr_t(mFrontLock.get())));
   } else {
     gfxShmSharedReadLock *lock = static_cast<gfxShmSharedReadLock*>(mFrontLock.get());
     return TexturedTileDescriptor(nullptr, mFrontBuffer->GetIPDLActor(),
                                   mFrontBufferOnWhite ? MaybeTexture(mFrontBufferOnWhite->GetIPDLActor()) : MaybeTexture(null_t()),
                                   mUpdateRect,
-                                  TileLock(lock->GetShmemSection()),
-                                  wasPlaceholder);
+                                  TileLock(lock->GetShmemSection()));
   }
 }
 
 void
 ClientMultiTiledLayerBuffer::ReadLock() {
   for (TileClient& tile : mRetainedTiles) {
     if (!tile.IsPlaceholderTile()) {
       tile.ReadLock();
@@ -891,45 +884,47 @@ ClientMultiTiledLayerBuffer::DiscardBuff
 }
 
 SurfaceDescriptorTiles
 ClientMultiTiledLayerBuffer::GetSurfaceDescriptorTiles()
 {
   InfallibleTArray<TileDescriptor> tiles;
 
   for (TileClient& tile : mRetainedTiles) {
-    TileDescriptor tileDesc = tile.GetTileDescriptor();
+    TileDescriptor tileDesc;
+    if (tile.IsPlaceholderTile()) {
+      tileDesc = PlaceholderTileDescriptor();
+    } else {
+      tileDesc = tile.GetTileDescriptor();
+    }
     tiles.AppendElement(tileDesc);
     // Reset the update rect
     tile.mUpdateRect = IntRect();
   }
   return SurfaceDescriptorTiles(mValidRegion,
                                 tiles,
                                 mTileOrigin, mTileSize,
                                 mTiles.mFirst.x, mTiles.mFirst.y,
                                 mTiles.mSize.width, mTiles.mSize.height,
                                 mResolution, mFrameResolution.xScale,
-                                mFrameResolution.yScale,
-                                mWasLastPaintProgressive);
+                                mFrameResolution.yScale);
 }
 
 void
 ClientMultiTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
                                          const nsIntRegion& aPaintRegion,
                                          const nsIntRegion& aDirtyRegion,
                                          LayerManager::DrawPaintedLayerCallback aCallback,
-                                         void* aCallbackData,
-                                         bool aIsProgressive)
+                                         void* aCallbackData)
 {
   TILING_LOG("TILING %p: PaintThebes painting region %s\n", mPaintedLayer, Stringify(aPaintRegion).c_str());
   TILING_LOG("TILING %p: PaintThebes new valid region %s\n", mPaintedLayer, Stringify(aNewValidRegion).c_str());
 
   mCallback = aCallback;
   mCallbackData = aCallbackData;
-  mWasLastPaintProgressive = aIsProgressive;
 
 #ifdef GFX_TILEDLAYER_PREF_WARNINGS
   long start = PR_IntervalNow();
 #endif
 
   // If this region is empty XMost() - 1 will give us a negative value.
   NS_ASSERTION(!aPaintRegion.GetBounds().IsEmpty(), "Empty paint region\n");
 
@@ -1653,17 +1648,17 @@ ClientMultiTiledLayerBuffer::Progressive
     // aValidRegion may have been altered by InvalidateRegion, but we still
     // want to display stale content until it gets progressively updated.
     // Create a region that includes stale content.
     nsIntRegion validOrStale;
     validOrStale.Or(aValidRegion, aOldValidRegion);
 
     // Paint the computed region and subtract it from the invalid region.
     PaintThebes(validOrStale, regionToPaint, aInvalidRegion,
-                aCallback, aCallbackData, true);
+                aCallback, aCallbackData);
     aInvalidRegion.Sub(aInvalidRegion, regionToPaint);
   } while (repeat);
 
   TILING_LOG("TILING %p: Progressive update final valid region %s buffer changed %d\n", mPaintedLayer, Stringify(aValidRegion).c_str(), isBufferChanged);
   TILING_LOG("TILING %p: Progressive update final invalid region %s\n", mPaintedLayer, Stringify(aInvalidRegion).c_str());
 
   // Return false if nothing has been drawn, or give what has been drawn
   // to the shadow layer to upload.
@@ -1692,15 +1687,14 @@ TiledContentClient::Dump(std::stringstre
   GetTiledBuffer()->Dump(aStream, aPrefix, aDumpHtml);
 }
 
 void
 BasicTiledLayerPaintData::ResetPaintData()
 {
   mLowPrecisionPaintCount = 0;
   mPaintFinished = false;
-  mHasTransformAnimation = false;
   mCompositionBounds.SetEmpty();
   mCriticalDisplayPort.SetEmpty();
 }
 
 } // namespace layers
 } // namespace mozilla
--- a/gfx/layers/client/TiledContentClient.h
+++ b/gfx/layers/client/TiledContentClient.h
@@ -270,17 +270,16 @@ struct TileClient
   RefPtr<TextureClient> mFrontBuffer;
   RefPtr<TextureClient> mFrontBufferOnWhite;
   RefPtr<gfxSharedReadLock> mBackLock;
   RefPtr<gfxSharedReadLock> mFrontLock;
   RefPtr<ClientLayerManager> mManager;
   RefPtr<TextureClientAllocator> mAllocator;
   gfx::IntRect mUpdateRect;
   CompositableClient* mCompositableClient;
-  bool mWasPlaceholder;
 #ifdef GFX_TILEDLAYER_DEBUG_OVERLAY
   TimeStamp        mLastUpdate;
 #endif
   nsIntRegion mInvalidFront;
   nsIntRegion mInvalidBack;
   nsExpirationState mExpirationState;
 private:
   // Copies dirty pixels from the front buffer into the back buffer,
@@ -350,21 +349,16 @@ struct BasicTiledLayerPaintData {
   /*
    * Whether there is further work to complete this paint. This is used to
    * determine whether or not to repeat the transaction when painting
    * progressively.
    */
   bool mPaintFinished : 1;
 
   /*
-   * Whether or not there is an async transform animation active
-   */
-  bool mHasTransformAnimation : 1;
-
-  /*
    * Initializes/clears data to prepare for paint action.
    */
   void ResetPaintData();
 };
 
 class SharedFrameMetricsHelper
 {
 public:
@@ -408,25 +402,23 @@ class ClientTiledLayerBuffer
 {
 public:
   ClientTiledLayerBuffer(ClientTiledPaintedLayer* aPaintedLayer,
                          CompositableClient* aCompositableClient)
     : mPaintedLayer(aPaintedLayer)
     , mCompositableClient(aCompositableClient)
     , mLastPaintContentType(gfxContentType::COLOR)
     , mLastPaintSurfaceMode(SurfaceMode::SURFACE_OPAQUE)
-    , mWasLastPaintProgressive(false)
   {}
 
   virtual void PaintThebes(const nsIntRegion& aNewValidRegion,
                    const nsIntRegion& aPaintRegion,
                    const nsIntRegion& aDirtyRegion,
                    LayerManager::DrawPaintedLayerCallback aCallback,
-                   void* aCallbackData,
-                   bool aIsProgressive = false) = 0;
+                   void* aCallbackData) = 0;
 
   virtual bool SupportsProgressiveUpdate() = 0;
   virtual bool ProgressiveUpdate(nsIntRegion& aValidRegion,
                          nsIntRegion& aInvalidRegion,
                          const nsIntRegion& aOldValidRegion,
                          BasicTiledLayerPaintData* aPaintData,
                          LayerManager::DrawPaintedLayerCallback aCallback,
                          void* aCallbackData) = 0;
@@ -450,18 +442,16 @@ protected:
   gfxContentType GetContentType(SurfaceMode* aMode = nullptr) const;
 
   ClientTiledPaintedLayer* mPaintedLayer;
   CompositableClient* mCompositableClient;
 
   gfxContentType mLastPaintContentType;
   SurfaceMode mLastPaintSurfaceMode;
   CSSToParentLayerScale2D mFrameResolution;
-
-  bool mWasLastPaintProgressive;
 };
 
 class ClientMultiTiledLayerBuffer
   : public TiledLayerBuffer<ClientMultiTiledLayerBuffer, TileClient>
   , public ClientTiledLayerBuffer
 {
   friend class TiledLayerBuffer<ClientMultiTiledLayerBuffer, TileClient>;
 public:
@@ -478,18 +468,17 @@ public:
     , mTilingOrigin(std::numeric_limits<int32_t>::max(),
                     std::numeric_limits<int32_t>::max())
   {}
 
   void PaintThebes(const nsIntRegion& aNewValidRegion,
                    const nsIntRegion& aPaintRegion,
                    const nsIntRegion& aDirtyRegion,
                    LayerManager::DrawPaintedLayerCallback aCallback,
-                   void* aCallbackData,
-                   bool aIsProgressive = false) override;
+                   void* aCallbackData) override;
 
   virtual bool SupportsProgressiveUpdate() override { return true; }
   /**
    * Performs a progressive update of a given tiled buffer.
    * See ComputeProgressiveUpdateRegion below for parameter documentation.
    */
   bool ProgressiveUpdate(nsIntRegion& aValidRegion,
                          nsIntRegion& aInvalidRegion,
--- a/gfx/layers/composite/ContentHost.h
+++ b/gfx/layers/composite/ContentHost.h
@@ -56,18 +56,16 @@ public:
   virtual bool UpdateThebes(const ThebesBufferData& aData,
                             const nsIntRegion& aUpdated,
                             const nsIntRegion& aOldValidRegionBack,
                             nsIntRegion* aUpdatedRegionBack) = 0;
 
   virtual void SetPaintWillResample(bool aResample) { mPaintWillResample = aResample; }
   bool PaintWillResample() { return mPaintWillResample; }
 
-  virtual void InvalidateForAnimation(nsIntRegion& aRegion) { }
-
 protected:
   explicit ContentHost(const TextureInfo& aTextureInfo)
     : CompositableHost(aTextureInfo)
     , mPaintWillResample(false)
   {}
 
   bool mPaintWillResample;
 };
--- a/gfx/layers/composite/PaintedLayerComposite.cpp
+++ b/gfx/layers/composite/PaintedLayerComposite.cpp
@@ -174,21 +174,10 @@ PaintedLayerComposite::PrintInfo(std::st
   if (mBuffer && mBuffer->IsAttached()) {
     aStream << "\n";
     nsAutoCString pfx(aPrefix);
     pfx += "  ";
     mBuffer->PrintInfo(aStream, pfx.get());
   }
 }
 
-const nsIntRegion
-PaintedLayerComposite::GetInvalidRegion()
-{
-  nsIntRegion region = mInvalidRegion;
-  if (mBuffer) {
-    mBuffer->InvalidateForAnimation(region);
-  }
-  return region;
-}
-
-
 } // namespace layers
 } // namespace mozilla
--- a/gfx/layers/composite/PaintedLayerComposite.h
+++ b/gfx/layers/composite/PaintedLayerComposite.h
@@ -68,18 +68,16 @@ public:
 
   void SetValidRegion(const nsIntRegion& aRegion)
   {
     MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) ValidRegion", this));
     mValidRegion = aRegion;
     Mutated();
   }
 
-  const virtual nsIntRegion GetInvalidRegion() override;
-
   MOZ_LAYER_DECL_NAME("PaintedLayerComposite", TYPE_PAINTED)
 
 protected:
 
   virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
 
 private:
   gfx::Filter GetEffectFilter() { return gfx::Filter::LINEAR; }
--- a/gfx/layers/composite/TiledContentHost.cpp
+++ b/gfx/layers/composite/TiledContentHost.cpp
@@ -5,17 +5,16 @@
 
 #include "TiledContentHost.h"
 #include "gfxPrefs.h"                   // for gfxPrefs
 #include "PaintedLayerComposite.h"      // for PaintedLayerComposite
 #include "mozilla/gfx/BaseSize.h"       // for BaseSize
 #include "mozilla/gfx/Matrix.h"         // for Matrix4x4
 #include "mozilla/gfx/Point.h"          // for IntSize
 #include "mozilla/layers/Compositor.h"  // for Compositor
-#include "mozilla/layers/CompositorParent.h"  // for CompositorParent
 #include "mozilla/layers/Effects.h"     // for TexturedEffect, Effect, etc
 #include "mozilla/layers/LayerMetricsWrapper.h" // for LayerMetricsWrapper
 #include "mozilla/layers/TextureHostOGL.h"  // for TextureHostOGL
 #include "nsAString.h"
 #include "nsDebug.h"                    // for NS_WARNING
 #include "nsPoint.h"                    // for IntPoint
 #include "nsPrintfCString.h"            // for nsPrintfCString
 #include "nsRect.h"                     // for IntRect
@@ -24,36 +23,16 @@
 class gfxReusableSurfaceWrapper;
 
 namespace mozilla {
 using namespace gfx;
 namespace layers {
 
 class Layer;
 
-float
-TileHost::GetFadeInOpacity(float aOpacity)
-{
-  TimeStamp now = TimeStamp::Now();
-  if (!gfxPrefs::LayerTileFadeInEnabled() ||
-      mFadeStart.IsNull() ||
-      now < mFadeStart)
-  {
-    return aOpacity;
-  }
-
-  float duration = gfxPrefs::LayerTileFadeInDuration();
-  float elapsed = (now - mFadeStart).ToMilliseconds();
-  if (elapsed > duration) {
-    mFadeStart = TimeStamp();
-    return aOpacity;
-  }
-  return aOpacity * (elapsed / duration);
-}
-
 TiledLayerBufferComposite::TiledLayerBufferComposite()
   : mFrameResolution()
 {}
 
 TiledLayerBufferComposite::~TiledLayerBufferComposite()
 {
   Clear();
 }
@@ -72,31 +51,16 @@ TiledLayerBufferComposite::SetCompositor
     if (tile.IsPlaceholderTile()) continue;
     tile.mTextureHost->SetCompositor(aCompositor);
     if (tile.mTextureHostOnWhite) {
       tile.mTextureHostOnWhite->SetCompositor(aCompositor);
     }
   }
 }
 
-void
-TiledLayerBufferComposite::InvalidateForAnimation(nsIntRegion& aRegion)
-{
-  // We need to invalidate rects where we have a tile that is in the
-  // process of fading in.
-  for (size_t i = 0; i < mRetainedTiles.Length(); i++) {
-    if (!mRetainedTiles[i].mFadeStart.IsNull()) {
-      TileIntPoint position = mTiles.TilePosition(i);
-      IntPoint offset = GetTileOffset(position);
-      nsIntRegion tileRegion = IntRect(offset, GetScaledTileSize());
-      aRegion.OrWith(tileRegion);
-    }
-  }
-}
-
 TiledContentHost::TiledContentHost(const TextureInfo& aTextureInfo)
   : ContentHost(aTextureInfo)
   , mTiledBuffer(TiledLayerBufferComposite())
   , mLowPrecisionTiledBuffer(TiledLayerBufferComposite())
 {
   MOZ_COUNT_CTOR(TiledContentHost);
 }
 
@@ -264,24 +228,16 @@ public:
         if (aTile.mTextureHostOnWhite) {
           aTile.mTextureSourceOnWhite = Move(mTiles[i].mTextureSourceOnWhite);
         }
         break;
       }
     }
   }
 
-  void RecycleTileFading(TileHost& aTile) {
-    for (size_t i = 0; i < mTiles.Length(); i++) {
-      if (mTiles[i].mTextureHost == aTile.mTextureHost) {
-        aTile.mFadeStart = mTiles[i].mFadeStart;
-      }
-    }
-  }
-
 protected:
   nsTArray<TileHost> mTiles;
   size_t mFirstPossibility;
 };
 
 bool
 TiledLayerBufferComposite::UseTiles(const SurfaceDescriptorTiles& aTiles,
                                     Compositor* aCompositor,
@@ -349,30 +305,16 @@ TiledLayerBufferComposite::UseTiles(cons
         TextureHost::AsTextureHost(texturedDesc.textureOnWhite().get_PTextureParent());
     }
 
     tile.mTilePosition = newTiles.TilePosition(i);
 
     // If this same tile texture existed in the old tile set then this will move the texture
     // source into our new tile.
     oldRetainedTiles.RecycleTextureSourceForTile(tile);
-
-    // If this tile is in the process of fading, we need to keep that going
-    oldRetainedTiles.RecycleTileFading(tile);
-
-    if (aTiles.isProgressive() &&
-        texturedDesc.wasPlaceholder())
-    {
-      // This is a progressive paint, and the tile used to be a placeholder.
-      // We need to begin fading it in (if enabled via layers.tiles.fade-in.enabled)
-      tile.mFadeStart = TimeStamp::Now();
-
-      aCompositor->CompositeUntil(tile.mFadeStart +
-        TimeDuration::FromMilliseconds(gfxPrefs::LayerTileFadeInDuration()));
-    }
   }
 
   // Step 3, attempt to recycle unused texture sources from the old tile set into new tiles.
   //
   // For gralloc, binding a new TextureHost to the existing TextureSource is the fastest way
   // to ensure that any implicit locking on the old gralloc image is released.
   for (TileHost& tile : mRetainedTiles) {
     if (!tile.mTextureHost || tile.mTextureSource) {
@@ -540,31 +482,29 @@ TiledContentHost::RenderTile(TileHost& a
                          aTile.mTextureSourceOnWhite,
                          aFilter,
                          true,
                          aTile.mTextureHost->GetRenderState());
   if (!effect) {
     return;
   }
 
-  float opacity = aTile.GetFadeInOpacity(aOpacity);
-
   aEffectChain.mPrimaryEffect = effect;
 
   nsIntRegionRectIterator it(aScreenRegion);
   for (const IntRect* rect = it.Next(); rect != nullptr; rect = it.Next()) {
     Rect graphicsRect(rect->x, rect->y, rect->width, rect->height);
     Rect textureRect(rect->x - aTextureOffset.x, rect->y - aTextureOffset.y,
                      rect->width, rect->height);
 
     effect->mTextureCoords = Rect(textureRect.x / aTextureBounds.width,
                                   textureRect.y / aTextureBounds.height,
                                   textureRect.width / aTextureBounds.width,
                                   textureRect.height / aTextureBounds.height);
-    mCompositor->DrawQuad(graphicsRect, aClipRect, aEffectChain, opacity, aTransform, aVisibleRect);
+    mCompositor->DrawQuad(graphicsRect, aClipRect, aEffectChain, aOpacity, aTransform, aVisibleRect);
   }
   DiagnosticFlags flags = DiagnosticFlags::CONTENT | DiagnosticFlags::TILE;
   if (aTile.mTextureHostOnWhite) {
     flags |= DiagnosticFlags::COMPONENT_ALPHA;
   }
   mCompositor->DrawDiagnostics(flags,
                                aScreenRegion, aClipRect, aTransform, mFlashCounter);
 }
@@ -689,17 +629,10 @@ TiledContentHost::PrintInfo(std::strings
 void
 TiledContentHost::Dump(std::stringstream& aStream,
                        const char* aPrefix,
                        bool aDumpHtml)
 {
   mTiledBuffer.Dump(aStream, aPrefix, aDumpHtml);
 }
 
-void
-TiledContentHost::InvalidateForAnimation(nsIntRegion& aRegion)
-{
-  return mTiledBuffer.InvalidateForAnimation(aRegion);
-}
-
-
 } // namespace layers
 } // namespace mozilla
--- a/gfx/layers/composite/TiledContentHost.h
+++ b/gfx/layers/composite/TiledContentHost.h
@@ -108,32 +108,23 @@ public:
     aStream << "TileHost(...)"; // fill in as needed
   }
 
   void DumpTexture(std::stringstream& aStream) {
     // TODO We should combine the OnWhite/OnBlack here an just output a single image.
     CompositableHost::DumpTextureHost(aStream, mTextureHost);
   }
 
-  /**
-   * This does a linear tween of the passed opacity (which is assumed
-   * to be between 0.0 and 1.0). The duration of the fade is controlled
-   * by the 'layers.tiles.fade-in.duration-ms' preference. It is enabled
-   * via 'layers.tiles.fade-in.enabled'
-   */
-  float GetFadeInOpacity(float aOpacity);
-
   RefPtr<gfxSharedReadLock> mSharedLock;
   CompositableTextureHostRef mTextureHost;
   CompositableTextureHostRef mTextureHostOnWhite;
   mutable CompositableTextureSourceRef mTextureSource;
   mutable CompositableTextureSourceRef mTextureSourceOnWhite;
   // This is not strictly necessary but makes debugging whole lot easier.
   TileIntPoint mTilePosition;
-  TimeStamp mFadeStart;
 };
 
 class TiledLayerBufferComposite
   : public TiledLayerBuffer<TiledLayerBufferComposite, TileHost>
 {
   friend class TiledLayerBuffer<TiledLayerBufferComposite, TileHost>;
 
 public:
@@ -156,18 +147,16 @@ public:
   const CSSToParentLayerScale2D& GetFrameResolution() { return mFrameResolution; }
 
   void SetCompositor(Compositor* aCompositor);
 
   // Recycle callback for TextureHost.
   // Used when TiledContentClient is present in client side.
   static void RecycleCallback(TextureHost* textureHost, void* aClosure);
 
-  void InvalidateForAnimation(nsIntRegion& aRegion);
-
 protected:
 
   CSSToParentLayerScale2D mFrameResolution;
   nsTArray<RefPtr<gfxSharedReadLock>> mDelayedUnlocks;
 };
 
 /**
  * ContentHost for tiled PaintedLayers. Since tiled layers are special snow
@@ -273,18 +262,16 @@ public:
                       AttachFlags aFlags = NO_FLAGS) override;
 
   virtual void Dump(std::stringstream& aStream,
                     const char* aPrefix="",
                     bool aDumpHtml=false) override;
 
   virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
 
-  virtual void InvalidateForAnimation(nsIntRegion& aRegion) override;
-
 private:
 
   void RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
                          const gfxRGBA* aBackgroundColor,
                          EffectChain& aEffectChain,
                          float aOpacity,
                          const gfx::Filter& aFilter,
                          const gfx::Rect& aClipRect,
--- a/gfx/layers/ipc/LayersMessages.ipdlh
+++ b/gfx/layers/ipc/LayersMessages.ipdlh
@@ -314,17 +314,16 @@ union MaybeTexture {
   null_t;
 };
 
 struct TexturedTileDescriptor {
   PTexture texture;
   MaybeTexture textureOnWhite;
   IntRect updateRect;
   TileLock sharedLock;
-  bool wasPlaceholder;
 };
 
 struct PlaceholderTileDescriptor {
 };
 
 union TileDescriptor {
   TexturedTileDescriptor;
   PlaceholderTileDescriptor;
@@ -337,17 +336,16 @@ struct SurfaceDescriptorTiles {
   IntSize     tileSize;
   int         firstTileX;
   int         firstTileY;
   int         retainedWidth;
   int         retainedHeight;
   float       resolution;
   float       frameXResolution;
   float       frameYResolution;
-  bool        isProgressive;
 };
 
 struct OpUseTiledLayerBuffer {
   PCompositable compositable;
   SurfaceDescriptorTiles tileLayerDescriptor;
 };
 
 struct OpUseOverlaySource {
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -347,18 +347,16 @@ private:
   // they are often the same size as the screen, especially for width.
   DECL_GFX_PREF(Once, "layers.tile-width",                     LayersTileWidth, int32_t, 256);
   DECL_GFX_PREF(Once, "layers.tile-height",                    LayersTileHeight, int32_t, 256);
   DECL_GFX_PREF(Once, "layers.tile-max-pool-size",             LayersTileMaxPoolSize, uint32_t, (uint32_t)50);
   DECL_GFX_PREF(Once, "layers.tile-shrink-pool-timeout",       LayersTileShrinkPoolTimeout, uint32_t, (uint32_t)1000);
   DECL_GFX_PREF(Once, "layers.tiled-drawtarget.enabled",       TiledDrawTargetEnabled, bool, false);
   DECL_GFX_PREF(Once, "layers.tiles.adjust",                   LayersTilesAdjust, bool, true);
   DECL_GFX_PREF(Once, "layers.tiles.edge-padding",             TileEdgePaddingEnabled, bool, true);
-  DECL_GFX_PREF(Live, "layers.tiles.fade-in.enabled",          LayerTileFadeInEnabled, bool, false);
-  DECL_GFX_PREF(Live, "layers.tiles.fade-in.duration-ms",      LayerTileFadeInDuration, uint32_t, 100);
   DECL_GFX_PREF(Live, "layers.transaction.warning-ms",         LayerTransactionWarning, uint32_t, 200);
   DECL_GFX_PREF(Once, "layers.uniformity-info",                UniformityInfo, bool, false);
   DECL_GFX_PREF(Once, "layers.use-image-offscreen-surfaces",   UseImageOffscreenSurfaces, bool, false);
 
   DECL_GFX_PREF(Live, "layout.css.scroll-behavior.damping-ratio", ScrollBehaviorDampingRatio, float, 1.0f);
   DECL_GFX_PREF(Live, "layout.css.scroll-behavior.enabled",    ScrollBehaviorEnabled, bool, false);
   DECL_GFX_PREF(Live, "layout.css.scroll-behavior.spring-constant", ScrollBehaviorSpringConstant, float, 250.0f);
   DECL_GFX_PREF(Live, "layout.css.scroll-snap.prediction-max-velocity", ScrollSnapPredictionMaxVelocity, int32_t, 2000);