diff options
Diffstat (limited to 'image/DecodedSurfaceProvider.cpp')
-rw-r--r-- | image/DecodedSurfaceProvider.cpp | 6 |
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 |