summaryrefslogtreecommitdiffstats
path: root/image/SurfaceCache.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /image/SurfaceCache.cpp
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'image/SurfaceCache.cpp')
-rw-r--r--image/SurfaceCache.cpp11
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 {