summaryrefslogtreecommitdiffstats
path: root/image/SurfaceCache.cpp
diff options
context:
space:
mode:
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 {