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; |
} |