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

Unified Diff: src/gpu/GrDrawingManager.cpp

Issue 2386993004: Revert of Make GrResourceCache dynamically change between LRU and random replacement strategies. (Closed)
Patch Set: Created 4 years, 2 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/gpu/GrDrawingManager.h ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawingManager.cpp
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 75195670b2530744e73740fb9eb3ca3926667d16..5e9b68d88f3b40ddb14866b0957b1149b255e6ca 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -129,17 +129,10 @@
#endif
fFlushState.reset();
- // Avoid notifying the cache about successive client flushes where no rendering occurred between
- // them.
- bool skipNotify = false;
- if (!flushed) {
- skipNotify = GrResourceCache::kExternal == fLastFlushType &&
- GrResourceCache::kExternal == type;
- }
- if (!skipNotify) {
+ // We always have to notify the cache when it requested a flush so it can reset its state.
+ if (flushed || type == GrResourceCache::FlushType::kCacheRequested) {
fContext->getResourceCache()->notifyFlushOccurred(type);
}
- fLastFlushType = type;
fFlushing = false;
}
@@ -152,9 +145,6 @@
if (surface->surfacePriv().hasPendingIO()) {
this->flush();
- } else if (GrResourceCache::kExternal != fLastFlushType) {
- fContext->getResourceCache()->notifyFlushOccurred(GrResourceCache::kExternal);
- fLastFlushType = GrResourceCache::kExternal;
}
GrRenderTarget* rt = surface->asRenderTarget();
« no previous file with comments | « src/gpu/GrDrawingManager.h ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698