diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /image/SurfaceCache.cpp | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-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/SurfaceCache.cpp')
-rw-r--r-- | image/SurfaceCache.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/image/SurfaceCache.cpp b/image/SurfaceCache.cpp index 6f05bce6ff..cccbd505f5 100644 --- a/image/SurfaceCache.cpp +++ b/image/SurfaceCache.cpp @@ -181,7 +181,7 @@ class CachedSurface { return aMallocSizeOf(this) + aMallocSizeOf(mProvider.get()); } - void InvalidateRecording() { mProvider->InvalidateRecording(); } + void InvalidateSurface() { mProvider->InvalidateSurface(); } // A helper type used by SurfaceCacheImpl::CollectSizeOfSurfaces. struct MOZ_STACK_CLASS SurfaceMemoryReport { @@ -543,13 +543,14 @@ class ImageSurfaceCache { bool Invalidate(Function&& aRemoveCallback) { // Remove all non-blob recordings from the cache. Invalidate any blob // recordings. - bool foundRecording = false; + bool found = false; for (auto iter = mSurfaces.Iter(); !iter.Done(); iter.Next()) { NotNull<CachedSurface*> current = WrapNotNull(iter.UserData()); + found = true; + current->InvalidateSurface(); + if (current->GetSurfaceKey().Flags() & SurfaceFlags::RECORD_BLOB) { - foundRecording = true; - current->InvalidateRecording(); continue; } @@ -558,7 +559,7 @@ class ImageSurfaceCache { } AfterMaybeRemove(); - return foundRecording; + return found; } IntSize SuggestedSize(const IntSize& aSize) const { |