diff options
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 5f4e663580..6221fea3c6 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; } |