diff --git a/image/DynamicImage.cpp b/image/DynamicImage.cpp index a0431c84436c..0fef5e30f1b2 100644 --- a/image/DynamicImage.cpp +++ b/image/DynamicImage.cpp @@ -80,7 +80,7 @@ DynamicImage::OnImageDataComplete(nsIRequest* aRequest, } void -DynamicImage::OnSurfaceDiscarded(SurfaceKey aSurfaceKey) +DynamicImage::OnSurfaceDiscarded() { } void diff --git a/image/DynamicImage.h b/image/DynamicImage.h index 06e21aef7e4b..751bed82a140 100644 --- a/image/DynamicImage.h +++ b/image/DynamicImage.h @@ -53,7 +53,7 @@ public: 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; diff --git a/image/Image.h b/image/Image.h index dca64d90dba4..5efa957ef4b3 100644 --- a/image/Image.h +++ b/image/Image.h @@ -216,7 +216,7 @@ public: /** * 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; @@ -256,7 +256,7 @@ public: } #endif - virtual void OnSurfaceDiscarded(SurfaceKey aSurfaceKey) override { } + virtual void OnSurfaceDiscarded() override { } virtual void SetInnerWindowID(uint64_t aInnerWindowId) override { diff --git a/image/ImageWrapper.cpp b/image/ImageWrapper.cpp index c3335871e36c..f2bc3725ebf9 100644 --- a/image/ImageWrapper.cpp +++ b/image/ImageWrapper.cpp @@ -88,9 +88,9 @@ ImageWrapper::OnImageDataComplete(nsIRequest* aRequest, } void -ImageWrapper::OnSurfaceDiscarded(SurfaceKey aSurfaceKey) +ImageWrapper::OnSurfaceDiscarded() { - return mInnerImage->OnSurfaceDiscarded(aSurfaceKey); + return mInnerImage->OnSurfaceDiscarded(); } void diff --git a/image/ImageWrapper.h b/image/ImageWrapper.h index e7aae3f90354..f60a1c09c3d2 100644 --- a/image/ImageWrapper.h +++ b/image/ImageWrapper.h @@ -45,7 +45,7 @@ public: 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; diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp index 99205b798177..f205835fd312 100644 --- a/image/RasterImage.cpp +++ b/image/RasterImage.cpp @@ -420,11 +420,11 @@ RasterImage::WillDrawOpaqueNow() } 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); } diff --git a/image/RasterImage.h b/image/RasterImage.h index 9f4a10edf1be..c205f692c50f 100644 --- a/image/RasterImage.h +++ b/image/RasterImage.h @@ -164,7 +164,7 @@ public: 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; diff --git a/image/SurfaceCache.cpp b/image/SurfaceCache.cpp index db26a7299faf..2ca3ca7eca1c 100644 --- a/image/SurfaceCache.cpp +++ b/image/SurfaceCache.cpp @@ -502,7 +502,7 @@ public: // If the surface was not a placeholder, tell its image that we discarded it. if (!aSurface->IsPlaceholder()) { - static_cast(imageKey)->OnSurfaceDiscarded(aSurface->GetSurfaceKey()); + static_cast(imageKey)->OnSurfaceDiscarded(); } StopTracking(aSurface); diff --git a/image/VectorImage.cpp b/image/VectorImage.cpp index 21ad0ce1d743..472bf55655f0 100644 --- a/image/VectorImage.cpp +++ b/image/VectorImage.cpp @@ -1123,7 +1123,7 @@ VectorImage::RequestDiscard() } void -VectorImage::OnSurfaceDiscarded(SurfaceKey aSurfaceKey) +VectorImage::OnSurfaceDiscarded() { MOZ_ASSERT(mProgressTracker); diff --git a/image/VectorImage.h b/image/VectorImage.h index a9600a72699f..e19aa939fbed 100644 --- a/image/VectorImage.h +++ b/image/VectorImage.h @@ -49,7 +49,7 @@ public: nsresult aResult, bool aLastPart) override; - virtual void OnSurfaceDiscarded(SurfaceKey aSurfaceKey) override; + virtual void OnSurfaceDiscarded() override; /** * Callback for SVGRootRenderingObserver.