From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- image/DecodedSurfaceProvider.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'image/DecodedSurfaceProvider.cpp') diff --git a/image/DecodedSurfaceProvider.cpp b/image/DecodedSurfaceProvider.cpp index cdfc27bcda..f60b52018e 100644 --- a/image/DecodedSurfaceProvider.cpp +++ b/image/DecodedSurfaceProvider.cpp @@ -222,6 +222,10 @@ nsresult DecodedSurfaceProvider::UpdateKey( nsresult SimpleSurfaceProvider::UpdateKey( layers::RenderRootStateManager* aManager, wr::IpcResourceUpdateQueue& aResources, wr::ImageKey& aKey) { + if (mDirty) { + return NS_ERROR_FAILURE; + } + RefPtr surface = mSurface->GetSourceSurface(); if (!surface) { return NS_ERROR_FAILURE; @@ -230,5 +234,7 @@ nsresult SimpleSurfaceProvider::UpdateKey( return SharedSurfacesChild::Share(surface, aManager, aResources, aKey); } +void SimpleSurfaceProvider::InvalidateSurface() { mDirty = true; } + } // namespace image } // namespace mozilla -- cgit v1.2.3