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

Unified Diff: src/gpu/GrContext.cpp

Issue 2298003003: Don't purge resources for trivial GrContext flushes (Closed)
Patch Set: Fix speeling Created 4 years, 4 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 | « no previous file | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 5f4e663580a7e525cdac0f07f110a9b7f70e909e..6221fea3c66fa112243967a2efc0f3a6966e55de 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -228,13 +228,15 @@ void GrContext::TextBlobCacheOverBudgetCB(void* data) {
void GrContext::flush(int flagsBitfield) {
ASSERT_SINGLE_OWNER
RETURN_IF_ABANDONED
-
+ bool flushed = false;
if (kDiscard_FlushBit & flagsBitfield) {
fDrawingManager->reset();
} else {
- fDrawingManager->flush();
+ flushed = fDrawingManager->flush();
+ }
+ if (flushed) {
+ fResourceCache->notifyFlushOccurred();
}
- fResourceCache->notifyFlushOccurred();
fFlushToReduceCacheSize = false;
}
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698