summaryrefslogtreecommitdiffstats
path: root/image/DecodedSurfaceProvider.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /image/DecodedSurfaceProvider.cpp
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'image/DecodedSurfaceProvider.cpp')
-rw-r--r--image/DecodedSurfaceProvider.cpp6
1 files changed, 6 insertions, 0 deletions
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<SourceSurface> 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