Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: src/core/SkPixelRef.cpp

Issue 936423002: Revert of notify resource caches when pixelref genID goes stale (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBitmapCache.cpp ('k') | src/core/SkResourceCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixelRef.cpp
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index a2638c9431777d7301aed5acc25ed037c70c21cb..f56298165cd67648276272f6667d9753c38b604e 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -5,7 +5,6 @@
* found in the LICENSE file.
*/
-#include "SkBitmapCache.h"
#include "SkPixelRef.h"
#include "SkThread.h"
@@ -223,7 +222,6 @@
*fGenIDChangeListeners.append() = listener;
}
-// we need to be called *before* the genID gets changed or zerod
void SkPixelRef::callGenIDChangeListeners() {
// We don't invalidate ourselves if we think another SkPixelRef is sharing our genID.
if (fUniqueGenerationID) {
@@ -233,15 +231,6 @@
}
// Listeners get at most one shot, so whether these triggered or not, blow them away.
fGenIDChangeListeners.deleteAll();
-
- // if fGenerationID is 0, then perhaps we never had one, and we are in the destructor
- if (fGenerationID) {
- // If the ResourceCache ever generalizes/standardizes on accessing the gen-id field,
- // then it would be more efficient to roll these together, and only grab the mutex
- // and fixing the resources once...
- SkBitmapCache::NotifyGenIDStale(fGenerationID);
- SkMipMapCache::NotifyGenIDStale(fGenerationID);
- }
}
void SkPixelRef::notifyPixelsChanged() {
« no previous file with comments | « src/core/SkBitmapCache.cpp ('k') | src/core/SkResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698