Backed out changeset 29e2e6dd82d2 (bug 1343341)
authorTimothy Nikkel <tnikkel@gmail.com>
Wed, 15 Mar 2017 03:13:33 -0500
changeset 347723 0394f4a6e9e9436e70409bc9f0eff8378f945f27
parent 347722 5a8529ec2ec2bd6335a2e91e2c399f9c83b22c2a
child 347724 a22dff44c2abd5ddad3276cf7ebbb943dd343ccf
push id31502
push usercbook@mozilla.com
push dateWed, 15 Mar 2017 12:13:00 +0000
treeherdermozilla-central@48006b970731 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1343341
milestone55.0a1
backs out29e2e6dd82d298a1febed9c03ca0d5d6757d9607
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 29e2e6dd82d2 (bug 1343341)
image/DynamicImage.cpp
image/DynamicImage.h
image/Image.h
image/ImageWrapper.cpp
image/ImageWrapper.h
image/RasterImage.cpp
image/RasterImage.h
image/SurfaceCache.cpp
image/VectorImage.cpp
image/VectorImage.h
--- a/image/DynamicImage.cpp
+++ b/image/DynamicImage.cpp
@@ -75,17 +75,17 @@ DynamicImage::OnImageDataComplete(nsIReq
                                   nsISupports* aContext,
                                   nsresult aStatus,
                                   bool aLastPart)
 {
   return NS_OK;
 }
 
 void
-DynamicImage::OnSurfaceDiscarded(SurfaceKey aSurfaceKey)
+DynamicImage::OnSurfaceDiscarded()
 { }
 
 void
 DynamicImage::SetInnerWindowID(uint64_t aInnerWindowId)
 { }
 
 uint64_t
 DynamicImage::InnerWindowID() const
--- a/image/DynamicImage.h
+++ b/image/DynamicImage.h
@@ -48,17 +48,17 @@ public:
                                         nsIInputStream* aInStr,
                                         uint64_t aSourceOffset,
                                         uint32_t aCount) override;
   virtual nsresult OnImageDataComplete(nsIRequest* aRequest,
                                        nsISupports* aContext,
                                        nsresult aStatus,
                                        bool aLastPart) override;
 
-  virtual void OnSurfaceDiscarded(SurfaceKey aSurfaceKey) override;
+  virtual void OnSurfaceDiscarded() override;
 
   virtual void SetInnerWindowID(uint64_t aInnerWindowId) override;
   virtual uint64_t InnerWindowID() const override;
 
   virtual bool HasError() override;
   virtual void SetHasError() override;
 
   virtual ImageURL* GetURI() override;
--- a/image/Image.h
+++ b/image/Image.h
@@ -211,17 +211,17 @@ public:
   virtual nsresult OnImageDataComplete(nsIRequest* aRequest,
                                        nsISupports* aContext,
                                        nsresult aStatus,
                                        bool aLastPart) = 0;
 
   /**
    * Called when the SurfaceCache discards a surface belonging to this image.
    */
-  virtual void OnSurfaceDiscarded(SurfaceKey aSurfaceKey) = 0;
+  virtual void OnSurfaceDiscarded() = 0;
 
   virtual void SetInnerWindowID(uint64_t aInnerWindowId) = 0;
   virtual uint64_t InnerWindowID() const = 0;
 
   virtual bool HasError() = 0;
   virtual void SetHasError() = 0;
 
   virtual ImageURL* GetURI() = 0;
@@ -251,17 +251,17 @@ public:
   virtual void DecrementAnimationConsumers() override;
 #ifdef DEBUG
   virtual uint32_t GetAnimationConsumers() override
   {
     return mAnimationConsumers;
   }
 #endif
 
-  virtual void OnSurfaceDiscarded(SurfaceKey aSurfaceKey) override { }
+  virtual void OnSurfaceDiscarded() override { }
 
   virtual void SetInnerWindowID(uint64_t aInnerWindowId) override
   {
     mInnerWindowId = aInnerWindowId;
   }
   virtual uint64_t InnerWindowID() const override { return mInnerWindowId; }
 
   virtual bool HasError() override    { return mError; }
--- a/image/ImageWrapper.cpp
+++ b/image/ImageWrapper.cpp
@@ -83,19 +83,19 @@ ImageWrapper::OnImageDataComplete(nsIReq
                                   nsresult aStatus,
                                   bool aLastPart)
 {
   return mInnerImage->OnImageDataComplete(aRequest, aContext, aStatus,
                                           aLastPart);
 }
 
 void
-ImageWrapper::OnSurfaceDiscarded(SurfaceKey aSurfaceKey)
+ImageWrapper::OnSurfaceDiscarded()
 {
-  return mInnerImage->OnSurfaceDiscarded(aSurfaceKey);
+  return mInnerImage->OnSurfaceDiscarded();
 }
 
 void
 ImageWrapper::SetInnerWindowID(uint64_t aInnerWindowId)
 {
   mInnerImage->SetInnerWindowID(aInnerWindowId);
 }
 
--- a/image/ImageWrapper.h
+++ b/image/ImageWrapper.h
@@ -40,17 +40,17 @@ public:
                                         nsIInputStream* aInStr,
                                         uint64_t aSourceOffset,
                                         uint32_t aCount) override;
   virtual nsresult OnImageDataComplete(nsIRequest* aRequest,
                                        nsISupports* aContext,
                                        nsresult aStatus,
                                        bool aLastPart) override;
 
-  virtual void OnSurfaceDiscarded(SurfaceKey aSurfaceKey) override;
+  virtual void OnSurfaceDiscarded() override;
 
   virtual void SetInnerWindowID(uint64_t aInnerWindowId) override;
   virtual uint64_t InnerWindowID() const override;
 
   virtual bool HasError() override;
   virtual void SetHasError() override;
 
   virtual ImageURL* GetURI() override;
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -415,21 +415,21 @@ RasterImage::WillDrawOpaqueNow()
       !result.Surface()->IsFinished()) {
     return false;
   }
 
   return true;
 }
 
 void
-RasterImage::OnSurfaceDiscarded(SurfaceKey aSurfaceKey)
+RasterImage::OnSurfaceDiscarded()
 {
   MOZ_ASSERT(mProgressTracker);
 
-  if (mAnimationState && aSurfaceKey.Playback() == PlaybackType::eAnimated) {
+  if (mAnimationState) {
     MOZ_ASSERT(gfxPrefs::ImageMemAnimatedDiscardable());
     mAnimationState->SetDiscarded(true);
   }
 
   NS_DispatchToMainThread(NewRunnableMethod("ProgressTracker::OnDiscard",
                                             mProgressTracker, &ProgressTracker::OnDiscard));
 }
 
--- a/image/RasterImage.h
+++ b/image/RasterImage.h
@@ -159,17 +159,17 @@ public:
 #ifdef DEBUG
   NS_DECL_IMGICONTAINERDEBUG
 #endif
 
   virtual nsresult StartAnimation() override;
   virtual nsresult StopAnimation() override;
 
   // Methods inherited from Image
-  virtual void OnSurfaceDiscarded(SurfaceKey aSurfaceKey) override;
+  virtual void OnSurfaceDiscarded() override;
 
   virtual size_t SizeOfSourceWithComputedFallback(MallocSizeOf aMallocSizeOf)
     const override;
   virtual void CollectSizeOfSurfaces(nsTArray<SurfaceMemoryCounter>& aCounters,
                                      MallocSizeOf aMallocSizeOf) const override;
 
   /* Triggers discarding. */
   void Discard();
--- a/image/SurfaceCache.cpp
+++ b/image/SurfaceCache.cpp
@@ -497,17 +497,17 @@ public:
   {
     ImageKey imageKey = aSurface->GetImageKey();
 
     RefPtr<ImageSurfaceCache> cache = GetImageCache(imageKey);
     MOZ_ASSERT(cache, "Shouldn't try to remove a surface with no image cache");
 
     // If the surface was not a placeholder, tell its image that we discarded it.
     if (!aSurface->IsPlaceholder()) {
-      static_cast<Image*>(imageKey)->OnSurfaceDiscarded(aSurface->GetSurfaceKey());
+      static_cast<Image*>(imageKey)->OnSurfaceDiscarded();
     }
 
     StopTracking(aSurface);
     cache->Remove(aSurface);
 
     // Remove the per-image cache if it's unneeded now. (Keep it if the image is
     // locked, since the per-image cache is where we store that state.)
     if (cache->IsEmpty() && !cache->IsLocked()) {
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -1118,17 +1118,17 @@ VectorImage::RequestDiscard()
     SurfaceCache::RemoveImage(ImageKey(this));
     mProgressTracker->OnDiscard();
   }
 
   return NS_OK;
 }
 
 void
-VectorImage::OnSurfaceDiscarded(SurfaceKey aSurfaceKey)
+VectorImage::OnSurfaceDiscarded()
 {
   MOZ_ASSERT(mProgressTracker);
 
   NS_DispatchToMainThread(NewRunnableMethod(mProgressTracker, &ProgressTracker::OnDiscard));
 }
 
 //******************************************************************************
 NS_IMETHODIMP
--- a/image/VectorImage.h
+++ b/image/VectorImage.h
@@ -44,17 +44,17 @@ public:
                                         nsIInputStream* aInStr,
                                         uint64_t aSourceOffset,
                                         uint32_t aCount) override;
   virtual nsresult OnImageDataComplete(nsIRequest* aRequest,
                                        nsISupports* aContext,
                                        nsresult aResult,
                                        bool aLastPart) override;
 
-  virtual void OnSurfaceDiscarded(SurfaceKey aSurfaceKey) override;
+  virtual void OnSurfaceDiscarded() override;
 
   /**
    * Callback for SVGRootRenderingObserver.
    *
    * This just sets a dirty flag that we check in VectorImage::RequestRefresh,
    * which is called under the ticks of the refresh driver of any observing
    * documents that we may have. Only then (after all animations in this image
    * have been updated) do we send out "frame changed" notifications,